Sha256: 4b5e18a522411ad7bfe9595a9cb6d92255dd151ed9cc64b81800eea147bcc7c9

Contents?: true

Size: 1003 Bytes

Versions: 5

Compression:

Stored size: 1003 Bytes

Contents

Rollbar.plugins.define('sidekiq >= 3') do
  require_dependency('sidekiq')
  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::ResetScope
      end

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

Rollbar.plugins.define('sidekiq < 3') do
  require_dependency('sidekiq')
  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-3.6.0 lib/rollbar/plugins/sidekiq.rb
rollbar-3.5.2 lib/rollbar/plugins/sidekiq.rb
rollbar-3.5.1 lib/rollbar/plugins/sidekiq.rb
rollbar-3.5.0 lib/rollbar/plugins/sidekiq.rb
rollbar-3.4.2 lib/rollbar/plugins/sidekiq.rb