Skip to content

Commit 9aec28f

Browse files
committed
context comment
1 parent db681ab commit 9aec28f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/prometheus_exporter/instrumentation/delayed_job.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ def register_plugin(client: nil)
1717
max_attempts = Delayed::Worker.max_attempts
1818
enqueued_count = Delayed::Job.where(queue: job.queue).count
1919
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
2021
ready_count = Delayed::Job.where(queue: job.queue, run_at: ..Time.current).count
2122
instrumenter.call(job, max_attempts, enqueued_count, pending_count, ready_count, *args, &block)
2223
end

0 commit comments

Comments
 (0)