Sha256: 4edbc270d5fdfa8eefcd97272e447ac57d26b9dec63c5fe65a79c5edf551c303
Contents?: true
Size: 712 Bytes
Versions: 6
Compression:
Stored size: 712 Bytes
Contents
begin require 'sidekiq' rescue LoadError end if defined? Sidekiq module Opbeat module Integrations class Sidekiq def call(worker, msg, queue) begin yield rescue Exception => ex raise ex if [Interrupt, SystemExit, SignalException].include? ex.class ::Opbeat.captureException(ex) raise end end end end end ::Sidekiq.configure_server do |config| if ::Sidekiq::VERSION < '3' config.server_middleware do |chain| chain.add ::Opbeat::Integrations::Sidekiq end else config.error_handlers << Proc.new { |ex, ctx| ::Opbeat.captureException(ex) } end end end
Version data entries
6 entries across 6 versions & 1 rubygems