Sha256: fd291836635f32d8fd9d434cbaaa1043077a8fd247668005aabba2133937f615

Contents?: true

Size: 491 Bytes

Versions: 11

Compression:

Stored size: 491 Bytes

Contents

require 'sidekiq'

module Rollbar
  module Delay
    class Sidekiq
      OPTIONS = { 'queue' => 'rollbar', 'class' => self.name }.freeze

      def self.handle(payload)
        item = Rollbar.configuration.use_sidekiq.is_a?(Hash) ? OPTIONS.merge(Rollbar.configuration.use_sidekiq) : OPTIONS

        ::Sidekiq::Client.push item.merge('args' => [payload])
      end

      include ::Sidekiq::Worker

      def perform(*args)
        Rollbar.process_payload(*args)
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
rollbar-0.11.8 lib/rollbar/delay/sidekiq.rb
rollbar-0.11.7 lib/rollbar/delay/sidekiq.rb
rollbar-0.11.6 lib/rollbar/delay/sidekiq.rb
rollbar-0.11.5 lib/rollbar/delay/sidekiq.rb
rollbar-0.11.4 lib/rollbar/delay/sidekiq.rb
rollbar-0.11.3 lib/rollbar/delay/sidekiq.rb
rollbar-0.11.2 lib/rollbar/delay/sidekiq.rb
rollbar-0.11.1 lib/rollbar/delay/sidekiq.rb
rollbar-0.10.14 lib/rollbar/delay/sidekiq.rb
rollbar-0.10.12 lib/rollbar/delay/sidekiq.rb
rollbar-0.10.11 lib/rollbar/delay/sidekiq.rb