aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Wilmott <p@p8952.info>2015-02-14 22:25:03 +0000
committerPeter Wilmott <p@p8952.info>2015-02-14 22:25:03 +0000
commite0625494860b832f89720c57a450289de5a5c7b8 (patch)
tree9b8fd049972cc5c9c00309504cee7cc61c12ee58 /web/lib/packages.rb
parentAdd timestamps to pages using the 'builds' and 'repomans' tables (diff)
downloadruby-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.rb6
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