15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'lib/rabbit_wq/message_handler.rb', line 15
def call( options )
Time.zone = Servitude.configuration.time_zone
channel = options[:channel]
delivery_info = options[:delivery_info]
metadata = options[:metadata]
payload = options[:payload]
worker = deserialize_worker( payload )
info Rainbow( "WORKER [#{worker.object_id}] " + worker.inspect ).yellow
handle_work( worker, payload )
try_on_success_callback( worker )
channel.ack delivery_info.delivery_tag
rescue => e
handle_error( worker, e, channel, delivery_info, payload, metadata )
end
|