Sha256: be9b1dbe9a10bfb3849a0223da3a48a3d66bf70b8c25a71464e890a271d9c1ca
Contents?: true
Size: 585 Bytes
Versions: 7
Compression:
Stored size: 585 Bytes
Contents
require 'shoryuken' require 'exception_notifier' module ExceptionNotification module Shoryuken class ExceptionNotificationMiddleware def call(worker, queue, sqs_msg, body) begin yield rescue Exception => exception ExceptionNotifier.notify_exception(exception, :data => { :sqs_msg => sqs_msg.inspect }) raise exception end end end end end Shoryuken.configure_server do |config| config.server_middleware do |chain| chain.add ExceptionNotification::Shoryuken::ExceptionNotificationMiddleware end end
Version data entries
7 entries across 7 versions & 1 rubygems