Class: Bugsnag::Sidekiq
- Inherits:
-
Object
- Object
- Bugsnag::Sidekiq
- Defined in:
- lib/bugsnag/sidekiq.rb
Instance Method Summary collapse
Instance Method Details
#call(worker, msg, queue) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/bugsnag/sidekiq.rb', line 5 def call(worker, msg, queue) begin # store msg/queue in thread local state to be read by Bugsnag::Middleware::Sidekiq Bugsnag.set_request_data :sidekiq, { :msg => msg, :queue => queue } yield rescue Exception => ex raise ex if [Interrupt, SystemExit, SignalException].include? ex.class Bugsnag.auto_notify(ex) raise ensure Bugsnag.clear_request_data end end |