Skip to content

Commit

Permalink
Merge pull request #90 from gocardless/reduce-log-noise
Browse files Browse the repository at this point in the history
Downgrade que.job_not_found log to debug
  • Loading branch information
stephenbinns authored Jun 30, 2023
2 parents a218169 + ec6b9ad commit 4a2d2e9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/que/worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,11 @@ def work_loop
@tracer.trace(RunningSecondsTotal, queue: @queue) do
loop do
case event = work
when :job_not_found, :postgres_error
Que.logger&.info(event: "que.#{event}", wake_interval: @wake_interval)
when :postgres_error
Que.logger&.info(event: "que.postgres_error", wake_interval: @wake_interval)
@tracer.trace(SleepingSecondsTotal, queue: @queue) { sleep(@wake_interval) }
when :job_not_found
Que.logger&.debug(event: "que.job_not_found", wake_interval: @wake_interval)
@tracer.trace(SleepingSecondsTotal, queue: @queue) { sleep(@wake_interval) }
when :job_worked
nil # immediately find a new job to work
Expand Down

0 comments on commit 4a2d2e9

Please sign in to comment.