lib/rabbit/receiving/job.rb in rabbit_messaging-0.7.1 vs lib/rabbit/receiving/job.rb in rabbit_messaging-0.8.1
- old
+ new
@@ -9,16 +9,14 @@
require "rabbit/receiving/malformed_message"
class Rabbit::Receiving::Job < ActiveJob::Base
def perform(message, arguments)
Lamian.run do
- begin
- message = Rabbit::Receiving::Message.build(message, arguments)
- handler = Rabbit::Receiving::HandlerResolver.handler_for(message)
- handler.new(message).call
- rescue Rabbit::Receiving::MalformedMessage => error
- raise if Rabbit.config.environment == :test
- Rabbit.config.exception_notifier.call(error)
- end
+ message = Rabbit::Receiving::Message.build(message, arguments)
+ handler = Rabbit::Receiving::HandlerResolver.handler_for(message)
+ handler.new(message).call
+ rescue Rabbit::Receiving::MalformedMessage => error
+ raise if Rabbit.config.environment == :test
+ Rabbit.config.exception_notifier.call(error)
end
end
end