distribute tag subscription processor over 20 hours

This commit is contained in:
r888888888
2016-01-23 18:28:56 -08:00
parent 910fb5cadd
commit 11f816a196

View File

@@ -182,7 +182,7 @@ class TagSubscription < ActiveRecord::Base
def self.process_all
find_each do |tag_subscription|
if tag_subscription.is_active?
time = rand(4 * 60 * 60).seconds.from_now
time = rand(20 * 60 * 60).seconds.from_now
TagSubscription.delay(:run_at => time, :queue => "default", :priority => 10).process(tag_subscription.id)
end
end