diff options
author | Peter Wilmott <p@p8952.info> | 2015-02-14 22:25:03 +0000 |
---|---|---|
committer | Peter Wilmott <p@p8952.info> | 2015-02-14 22:25:03 +0000 |
commit | e0625494860b832f89720c57a450289de5a5c7b8 (patch) | |
tree | 9b8fd049972cc5c9c00309504cee7cc61c12ee58 /web/lib/packages.rb | |
parent | Add timestamps to pages using the 'builds' and 'repomans' tables (diff) | |
download | ruby-tinderbox-e0625494860b832f89720c57a450289de5a5c7b8.tar.gz ruby-tinderbox-e0625494860b832f89720c57a450289de5a5c7b8.tar.bz2 ruby-tinderbox-e0625494860b832f89720c57a450289de5a5c7b8.zip |
Improve the way timestamps are set after updating
Diffstat (limited to 'web/lib/packages.rb')
-rw-r--r-- | web/lib/packages.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/web/lib/packages.rb b/web/lib/packages.rb index 8a032b0..e76eef9 100644 --- a/web/lib/packages.rb +++ b/web/lib/packages.rb @@ -33,8 +33,6 @@ def update_packages update_timestamp = Time.now.to_i portage_timestamp = File.read('/usr/portage/metadata/timestamp.x').split.first - Package.each do |package| - package.update(update_timestamp: update_timestamp) - package.update(portage_timestamp: portage_timestamp) - end + Package.dataset.update(update_timestamp: update_timestamp) + Package.dataset.update(portage_timestamp: portage_timestamp) end |