class Rollbar::Delay::Sidekiq

Constants

OPTIONS

Public Class Methods

new(*args) click to toggle source
# File lib/rollbar/delay/sidekiq.rb, line 8
def initialize(*args)
  @options = (opts = args.shift) ? OPTIONS.merge(opts) : OPTIONS
end

Public Instance Methods

call(payload) click to toggle source
# 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) click to toggle source
# 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