Module: Sidekiq::Worker::ClassMethods
- Defined in:
- lib/rspec/sidekiq/helpers/within_sidekiq_retries_exhausted_block.rb
Instance Method Summary collapse
- #default_retries_exhausted_exception ⇒ Object
- #default_retries_exhausted_message ⇒ Object
- #within_sidekiq_retries_exhausted_block(user_msg = {}, exception = default_retries_exhausted_exception, &block) ⇒ Object
Instance Method Details
#default_retries_exhausted_exception ⇒ Object
20 21 22 |
# File 'lib/rspec/sidekiq/helpers/within_sidekiq_retries_exhausted_block.rb', line 20 def default_retries_exhausted_exception StandardError.new('An error occurred') end |
#default_retries_exhausted_message ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/rspec/sidekiq/helpers/within_sidekiq_retries_exhausted_block.rb', line 11 def { 'queue' => ['queue'], 'class' => name, 'args' => [], 'error_message' => 'An error occurred' } end |
#within_sidekiq_retries_exhausted_block(user_msg = {}, exception = default_retries_exhausted_exception, &block) ⇒ Object
6 7 8 9 |
# File 'lib/rspec/sidekiq/helpers/within_sidekiq_retries_exhausted_block.rb', line 6 def within_sidekiq_retries_exhausted_block(user_msg = {}, exception = default_retries_exhausted_exception, &block) block.call sidekiq_retries_exhausted_block.call(.merge(user_msg), exception) end |