Class: RuboCop::Cop::Sidekiq::HugeJobArguments
- Defined in:
- lib/rubocop/cop/sidekiq/huge_job_arguments.rb
Overview
Checks for potentially huge arguments passed to Sidekiq jobs.
Constant Summary collapse
- MSG =
'Avoid passing large arguments to Sidekiq jobs. Pass IDs and load records in the job instead.'- DEFAULT_MAX_ARRAY_SIZE =
10- DEFAULT_MAX_HASH_SIZE =
10- DEFAULT_MAX_PLUCK_COLUMNS =
3
Instance Method Summary collapse
- #on_send(node) ⇒ Object (also: #on_csend)
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
23 24 25 26 27 28 29 |
# File 'lib/rubocop/cop/sidekiq/huge_job_arguments.rb', line 23 def on_send(node) perform_call?(node) do node.arguments.each do |arg| check_argument(arg) end end end |