Class: CloseYourIt::Sidekiq::ErrorHandler

Inherits:
Object
  • Object
show all
Defined in:
lib/closeyourit/sidekiq/error_handler.rb

Overview

Error handler Sidekiq (registrato dal railtie solo se Sidekiq è presente). Sidekiq invoca ‘call(exception, context, config)` e NON ri-solleva → qui catturiamo e basta.

Instance Method Summary collapse

Instance Method Details

#call(exception, context, _config = nil) ⇒ Object



8
9
10
11
12
13
# File 'lib/closeyourit/sidekiq/error_handler.rb', line 8

def call(exception, context, _config = nil)
  apply_job_scope(context)
  CloseYourIt.capture_exception(exception, handled: false)
ensure
  CloseYourIt::Scope.reset!
end