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

Deprecate Worker#retries_exhausted in favor of the

`sidekiq_retries_exhausted` callback
This commit is contained in:
Justin Mazzi 2013-06-27 11:17:44 -04:00
parent 5200b282ea
commit ba2ec5800e

View file

@ -96,6 +96,7 @@ module Sidekiq
def retries_exhausted(worker, msg)
logger.debug { "Dropping message after hitting the retry maximum: #{msg}" }
if worker.respond_to?(:retries_exhausted)
logger.warn { "Defining `retries_exhausted` as a method is deprecated, use the `sidekiq_retries_exhausted` callback instead" }
worker.retries_exhausted(*msg['args'])
elsif worker.sidekiq_retries_exhausted_block?
worker.sidekiq_retries_exhausted_block.call(*msg['args'])