1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

send job to morgue before calling death handlers (#4363)

This commit is contained in:
Adam Mikulasev 2019-11-06 22:42:28 +11:00 committed by Mike Perham
parent 06cc7fe4ee
commit c045946d65

View file

@ -189,13 +189,13 @@ module Sidekiq
handle_exception(e, {context: "Error calling retries_exhausted", job: msg})
end
send_to_morgue(msg) unless msg["dead"] == false
Sidekiq.death_handlers.each do |handler|
handler.call(msg, exception)
rescue => e
handle_exception(e, {context: "Error calling death handler", job: msg})
end
send_to_morgue(msg) unless msg["dead"] == false
end
def send_to_morgue(msg)