Class: Rollbar::Sidekiq::ResetScope

Inherits:
Object
  • Object
show all
Defined in:
lib/rollbar/plugins/sidekiq/plugin.rb

Instance Method Summary collapse

Instance Method Details

#call(_worker, msg, _queue, &block) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/rollbar/plugins/sidekiq/plugin.rb', line 8

def call(_worker, msg, _queue, &block)
  Rollbar.reset_notifier! # clears scope

  return yield unless Rollbar.configuration.sidekiq_use_scoped_block

  Rollbar.scoped(Rollbar::Sidekiq.job_scope(msg), &block)
end