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:
parent
5200b282ea
commit
ba2ec5800e
1 changed files with 1 additions and 0 deletions
|
@ -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'])
|
||||
|
|
Loading…
Reference in a new issue