We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent db681ab commit 9aec28fCopy full SHA for 9aec28f
lib/prometheus_exporter/instrumentation/delayed_job.rb
@@ -17,6 +17,7 @@ def register_plugin(client: nil)
17
max_attempts = Delayed::Worker.max_attempts
18
enqueued_count = Delayed::Job.where(queue: job.queue).count
19
pending_count = Delayed::Job.where(attempts: 0, locked_at: nil, queue: job.queue).count
20
+ # It may be necessary to coallesce the run_at time with created_at timestamp to get a more accurate count
21
ready_count = Delayed::Job.where(queue: job.queue, run_at: ..Time.current).count
22
instrumenter.call(job, max_attempts, enqueued_count, pending_count, ready_count, *args, &block)
23
end
0 commit comments