Sha256: b7ca20353462ebd755b79f66b3688482ef18cc696e4149d0b3d5d8d0390aef41
Contents?: true
Size: 653 Bytes
Versions: 47
Compression:
Stored size: 653 Bytes
Contents
require 'sidekiq' module Rollbar module Delay class Sidekiq OPTIONS = { 'queue' => 'rollbar', 'class' => Rollbar::Delay::Sidekiq }.freeze def initialize(*args) @options = (opts = args.shift) ? OPTIONS.merge(opts) : OPTIONS end def call(payload) ::Sidekiq::Client.push @options.merge('args' => [payload]) end include ::Sidekiq::Worker def perform(*args) begin Rollbar.process_from_async_handler(*args) rescue # Raise the exception so Sidekiq can track the errored job # and retry it raise end end end end end
Version data entries
47 entries across 47 versions & 1 rubygems