Sha256: 317ab50b772ecfe59e2a1b6e3744771824f28fec7b2cd126f598bbddab1b6720

Contents?: true

Size: 432 Bytes

Versions: 3

Compression:

Stored size: 432 Bytes

Contents

require 'sidekiq'

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

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
exception_notification-4.0.1 lib/exception_notification/sidekiq.rb
exception_notification-4.0.0 lib/exception_notification/sidekiq.rb
exception_notification-4.0.0.rc1 lib/exception_notification/sidekiq.rb