Commit 16002231907cadaf04ef8b58b5ae42a366ce1da8
1 parent
4cafc3b8
Exists in
master
and in
27 other branches
Update delayed_job enqueue call to new api
Showing
2 changed files
with
2 additions
and
2 deletions
Show diff stats
config/initializers/activities_counter_cache.rb
1 | 1 | if Delayed::Backend::ActiveRecord::Job.table_exists? |
2 | 2 | job = Delayed::Backend::ActiveRecord::Job.all :conditions => ['handler LIKE ?', "%ActivitiesCounterCacheJob%"] |
3 | 3 | if job.blank? |
4 | - Delayed::Backend::ActiveRecord::Job.enqueue(ActivitiesCounterCacheJob.new, -3) | |
4 | + Delayed::Backend::ActiveRecord::Job.enqueue(ActivitiesCounterCacheJob.new, {:priority => -3}) | |
5 | 5 | end |
6 | 6 | end | ... | ... |
lib/log_memory_consumption_job.rb
... | ... | @@ -21,6 +21,6 @@ class LogMemoryConsumptionJob < Struct.new(:last_stat) |
21 | 21 | end |
22 | 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 | 25 | end |
26 | 26 | end | ... | ... |