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
18 19 20 |
# File 'lib/rspec/sidekiq/helpers/within_sidekiq_retries_exhausted_block.rb', line 18 def default_retries_exhausted_exception StandardError.new('An error occured') end |
#default_retries_exhausted_message ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/rspec/sidekiq/helpers/within_sidekiq_retries_exhausted_block.rb', line 9 def { 'queue' => [:worker], 'class' => name, 'args' => [], 'error_message' => 'An error occured' } end |
#within_sidekiq_retries_exhausted_block(user_msg = {}, exception = default_retries_exhausted_exception, &block) ⇒ Object
4 5 6 7 |
# File 'lib/rspec/sidekiq/helpers/within_sidekiq_retries_exhausted_block.rb', line 4 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 |