Class: Rollbar::Delay::Sidekiq
- Inherits:
-
Object
- Object
- Rollbar::Delay::Sidekiq
- Includes:
- Sidekiq::Worker
- Defined in:
- lib/rollbar/delay/sidekiq.rb
Constant Summary collapse
Instance Method Summary collapse
- #call(payload) ⇒ Object
-
#initialize(*args) ⇒ Sidekiq
constructor
A new instance of Sidekiq.
- #perform(*args) ⇒ Object
Constructor Details
Instance Method Details
#call(payload) ⇒ Object
12 13 14 15 16 |
# File 'lib/rollbar/delay/sidekiq.rb', line 12 def call(payload) return unless ::Sidekiq::Client.push(@options.merge('args' => [payload])).nil? raise(StandardError, 'Unable to push the job to Sidekiq') end |
#perform(*args) ⇒ Object
20 21 22 23 24 |
# File 'lib/rollbar/delay/sidekiq.rb', line 20 def perform(*args) Rollbar.process_from_async_handler(*args) # Do not rescue. Sidekiq will call the error handler. end |