mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
Clean up retries
This commit is contained in:
parent
09e332554d
commit
a42e4960c1
1 changed files with 4 additions and 2 deletions
|
@ -46,7 +46,7 @@ module Sidekiq
|
|||
#
|
||||
# Sidekiq.configure_server do |config|
|
||||
# config.server_middleware do |chain|
|
||||
# chain.add Middleware::Server::RetryJobs, {:max_retries => 7}
|
||||
# chain.add Middleware::Server::RetryJobs, :max_retries => 7
|
||||
# end
|
||||
# end
|
||||
class RetryJobs
|
||||
|
@ -106,6 +106,8 @@ module Sidekiq
|
|||
raise e
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def retries_exhausted(worker, msg)
|
||||
logger.debug { "Dropping message after hitting the retry maximum: #{msg}" }
|
||||
if worker.respond_to?(:retries_exhausted)
|
||||
|
@ -140,7 +142,7 @@ module Sidekiq
|
|||
begin
|
||||
worker.sidekiq_retry_in_block.call(count)
|
||||
rescue Exception => e
|
||||
logger.error { "Failure scheduling retry using the defined `sidekiq_retry_in` in #{worker.class.name}, falling back to default: #{e.message}"}
|
||||
handle_exception(e, { :context => "Failure scheduling retry using the defined `sidekiq_retry_in` in #{worker.class.name}, falling back to default" })
|
||||
nil
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue