Sha256: 81dcefefc49fdad00b412ade9a74a1c63f8570a49594503662139c4ebe574977
Contents?: true
Size: 463 Bytes
Versions: 2
Compression:
Stored size: 463 Bytes
Contents
begin require "airbrake" rescue LoadError end if defined?(Airbrake) module MessageQueue module ErrorHandlers class Airbrake def handle(message, consumer, ex) params = message.attributes.merge(:pid => Process.pid, :consumer => consumer.inspect) ::Airbrake.notify_or_ignore(ex, :parameters => params) end end end end MessageQueue.register_error_handler MessageQueue::ErrorHandlers::Airbrake.new end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
message_queue-0.1.1 | lib/message_queue/error_handlers/airbrake.rb |
message_queue-0.1.0 | lib/message_queue/error_handlers/airbrake.rb |