Class: RuboCop::Cop::Sidekiq::ExcessiveRetry

Inherits:
Base
  • Object
show all
Defined in:
lib/rubocop/cop/sidekiq/excessive_retry.rb

Overview

Checks for excessive retry counts in sidekiq_options.

Examples:

MaxRetries: 25 (default)

# bad
sidekiq_options retry: 100

Constant Summary collapse

MSG =
'Retry count exceeds the maximum allowed (%<max>d).'

Instance Method Summary collapse

Methods included from Sidekiq::Language

#active_job_class?, #perform_call?, #sidekiq_include?, #sidekiq_options_call?

Instance Method Details

#on_send(node) ⇒ Object Also known as: on_csend



15
16
17
18
19
# File 'lib/rubocop/cop/sidekiq/excessive_retry.rb', line 15

def on_send(node)
  sidekiq_options_call?(node) do |args|
    args.each { |arg| check_hash(arg) }
  end
end