diff --git a/config/routes.rb b/config/routes.rb index 56f618c..8db2b20 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,6 +1,9 @@ Rails.application.routes.draw do if ENV['worker_num']=='0' && File.basename($0) != 'rake' && !Rails.const_defined?('Console') Bulletin + if BulletinFeedCache.count>BulletinFeed.count*5 + BulletinFeedCache.collection.drop + end Thread.new do BulletinFeedCache.regenerate_all end