Sha256: 63b546de43531f0d671ed61663822869ed7b4f76726df280528d11823757384b

Contents?: true

Size: 916 Bytes

Versions: 5

Compression:

Stored size: 916 Bytes

Contents

Rollbar.plugins.define('sidekiq >= 3') do
  dependency { !configuration.disable_monkey_patch }
  dependency { defined?(Sidekiq) }
  dependency { Sidekiq::VERSION.split('.')[0].to_i >= 3 }

  execute do
    require 'rollbar/plugins/sidekiq/plugin'

    Sidekiq.configure_server do |config|
      config.server_middleware do |chain|
        chain.add Rollbar::Sidekiq::ClearScope
      end

      config.error_handlers << proc do |e, context|
        Rollbar::Sidekiq.handle_exception(context, e)
      end
    end
  end
end

Rollbar.plugins.define('sidekiq < 3') do
  dependency { !configuration.disable_monkey_patch }
  dependency { defined?(Sidekiq) }
  dependency { Sidekiq::VERSION.split('.')[0].to_i < 3 }

  execute do
    require 'rollbar/plugins/sidekiq/plugin'

    Sidekiq.configure_server do |config|
      config.server_middleware do |chain|
        chain.add Rollbar::Sidekiq
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rollbar-2.11.4 lib/rollbar/plugins/sidekiq.rb
rollbar-2.11.3 lib/rollbar/plugins/sidekiq.rb
rollbar-2.11.2 lib/rollbar/plugins/sidekiq.rb
rollbar-2.11.1 lib/rollbar/plugins/sidekiq.rb
rollbar-2.11.0 lib/rollbar/plugins/sidekiq.rb