Skip to content

Commit

Permalink
Fix log level of :retry_stopped event
Browse files Browse the repository at this point in the history
`subscribe_log_level` was not called for `:retry_stopped` event but for
`:enqueue_retry` event. So no log level was set for `:retry_stopped`
event, and the log level of `:enqueue_retry` event was altered from
`:info` to `:error`.

This commit fixes the log level of `:retry_stopped` event to `:error`
and restores the log level of `:enqueue_retry` event to `:info`.
  • Loading branch information
cbliard committed Oct 3, 2024
1 parent 2dec02a commit a2aff06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion activejob/lib/active_job/log_subscriber.rb
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def retry_stopped(event)
"Stopped retrying #{job.class} (Job ID: #{job.job_id}) due to a #{ex.class} (#{ex.message}), which reoccurred on #{job.executions} attempts."
end
end
subscribe_log_level :enqueue_retry, :error
subscribe_log_level :retry_stopped, :error

def discard(event)
job = event.payload[:job]
Expand Down

0 comments on commit a2aff06

Please sign in to comment.