Commit f58c398a9902b425e235a0e44b56801605996944
1 parent
c29b0edc
Exists in
master
and in
29 other branches
LogMemoryConsumption: disable delayed job setup
Such memory consumption logging should be done on the processes processing requests, and not on the delayed job processes.
Showing
2 changed files
with
0 additions
and
7 deletions
Show diff stats
config/initializers/log_memory_consumption.rb
@@ -1,5 +0,0 @@ | @@ -1,5 +0,0 @@ | ||
1 | -if Delayed::Backend::ActiveRecord::Job.table_exists? | ||
2 | - jobs = Delayed::Backend::ActiveRecord::Job.all :conditions => ['handler LIKE ?', "%LogMemoryConsumptionJob%"] | ||
3 | - jobs.map(&:destroy) if jobs.present? | ||
4 | - Delayed::Backend::ActiveRecord::Job.enqueue(LogMemoryConsumptionJob.new) | ||
5 | -end |
lib/log_memory_consumption_job.rb
@@ -20,7 +20,5 @@ class LogMemoryConsumptionJob < Struct.new(:last_stat) | @@ -20,7 +20,5 @@ class LogMemoryConsumptionJob < Struct.new(:last_stat) | ||
20 | i += 1 | 20 | i += 1 |
21 | end | 21 | end |
22 | logger << "\n" | 22 | logger << "\n" |
23 | - | ||
24 | - Delayed::Job.enqueue(LogMemoryConsumptionJob.new(stats), {:priority => 0, :run_at => PERIOD.seconds.from_now}) | ||
25 | end | 23 | end |
26 | end | 24 | end |