Commit 16002231907cadaf04ef8b58b5ae42a366ce1da8

Authored by Rodrigo Souto
1 parent 4cafc3b8

Update delayed_job enqueue call to new api

config/initializers/activities_counter_cache.rb
1 if Delayed::Backend::ActiveRecord::Job.table_exists? 1 if Delayed::Backend::ActiveRecord::Job.table_exists?
2 job = Delayed::Backend::ActiveRecord::Job.all :conditions => ['handler LIKE ?', "%ActivitiesCounterCacheJob%"] 2 job = Delayed::Backend::ActiveRecord::Job.all :conditions => ['handler LIKE ?', "%ActivitiesCounterCacheJob%"]
3 if job.blank? 3 if job.blank?
4 - Delayed::Backend::ActiveRecord::Job.enqueue(ActivitiesCounterCacheJob.new, -3) 4 + Delayed::Backend::ActiveRecord::Job.enqueue(ActivitiesCounterCacheJob.new, {:priority => -3})
5 end 5 end
6 end 6 end
lib/log_memory_consumption_job.rb
@@ -21,6 +21,6 @@ class LogMemoryConsumptionJob < Struct.new(:last_stat) @@ -21,6 +21,6 @@ class LogMemoryConsumptionJob < Struct.new(:last_stat)
21 end 21 end
22 logger << "\n" 22 logger << "\n"
23 23
24 - Delayed::Job.enqueue(LogMemoryConsumptionJob.new(stats), 0, PERIOD.seconds.from_now) 24 + Delayed::Job.enqueue(LogMemoryConsumptionJob.new(stats), {:priority => 0, :run_at => PERIOD.seconds.from_now})
25 end 25 end
26 end 26 end