lib/songkick_queue/worker.rb in songkick_queue-0.6.0 vs lib/songkick_queue/worker.rb in songkick_queue-1.0.0
- old
+ new
@@ -101,12 +101,14 @@
ActiveSupport::Notifications.instrument('consume_message.songkick_queue', instrumentation_options) do
consumer.process(payload)
end
rescue Object => exception
logger.error(exception)
+ channel.reject(delivery_info.delivery_tag, config.requeue_rejected_messages)
+ else
+ channel.ack(delivery_info.delivery_tag, false)
ensure
set_process_name
- channel.ack(delivery_info.delivery_tag, false)
end
def channel
client.channel
end