Sha256: e4dac68645ea2349b24f54ec778c6657653025ed78b2df4b634d438add40e47f
Contents?: true
Size: 724 Bytes
Versions: 14
Compression:
Stored size: 724 Bytes
Contents
require 'sidekiq' # Note: this class is only needed for Sidekiq version < 3. module ExceptionNotification class Sidekiq def call(worker, msg, queue) begin yield rescue Exception => exception ExceptionNotifier.notify_exception(exception, :data => { :sidekiq => msg }) raise exception end end end end if ::Sidekiq::VERSION < '3' ::Sidekiq.configure_server do |config| config.server_middleware do |chain| chain.add ::ExceptionNotification::Sidekiq end end else ::Sidekiq.configure_server do |config| config.error_handlers << Proc.new { |ex, context| ExceptionNotifier.notify_exception(ex, :data => { :sidekiq => context }) } end end
Version data entries
14 entries across 14 versions & 2 rubygems