Class: Sidekiq::SilentRetry::ServerMiddleware

Inherits:
Object
  • Object
show all
Includes:
Sidekiq::ServerMiddleware
Defined in:
lib/sidekiq/silent_retry/server_middleware.rb

Instance Method Summary collapse

Instance Method Details

#call(_job_instance, job_payload, _queue) ⇒ Object



8
9
10
11
12
13
14
15
# File 'lib/sidekiq/silent_retry/server_middleware.rb', line 8

def call(_job_instance, job_payload, _queue)
  yield
rescue StandardError => e
  raise e unless silent_retry_enabled?(job_payload, e)
  raise e if should_warn?(job_payload)

  raise Sidekiq::SilentRetry.silent_retry_error_class, e.message
end