lib/sidekiq/job_retry.rb in sidekiq-6.4.2 vs lib/sidekiq/job_retry.rb in sidekiq-6.5.0

- old
+ new

@@ -64,15 +64,16 @@ class JobRetry class Handled < ::RuntimeError; end class Skip < Handled; end - include Sidekiq::Util + include Sidekiq::Component DEFAULT_MAX_RETRY_ATTEMPTS = 25 - def initialize(options = {}) - @max_retries = Sidekiq.options.merge(options).fetch(:max_retries, DEFAULT_MAX_RETRY_ATTEMPTS) + def initialize(options) + @config = options + @max_retries = @config[:max_retries] || DEFAULT_MAX_RETRY_ATTEMPTS end # The global retry handler requires only the barest of data. # We want to be able to retry as much as possible so we don't # require the job to be instantiated.