From 2d26048addab7b055578101e8630d1a2d001e7de Mon Sep 17 00:00:00 2001 From: gabriel-arc Date: Mon, 31 Jan 2022 21:17:28 +0100 Subject: [PATCH 1/2] amqp publish dbg added --- lib/travis/amqp/publisher.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/travis/amqp/publisher.rb b/lib/travis/amqp/publisher.rb index 3eb2c2dd..ccf1d2b1 100644 --- a/lib/travis/amqp/publisher.rb +++ b/lib/travis/amqp/publisher.rb @@ -25,6 +25,8 @@ def publish(data, options = {}) data = MultiJson.encode(data) exchange.publish(data, deep_merge(default_data, options)) debug "Published AMQP message to #{routing_key}." + rescue Exception => e + puts "AMQP publish exception: #{e.message}" end protected From 44028e8a895073ef50b7d8e6419f8bd396c8671b Mon Sep 17 00:00:00 2001 From: gabriel-arc Date: Tue, 1 Feb 2022 09:01:22 +0100 Subject: [PATCH 2/2] log up --- lib/travis/amqp/publisher.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/travis/amqp/publisher.rb b/lib/travis/amqp/publisher.rb index ccf1d2b1..ab6c1c80 100644 --- a/lib/travis/amqp/publisher.rb +++ b/lib/travis/amqp/publisher.rb @@ -26,7 +26,7 @@ def publish(data, options = {}) exchange.publish(data, deep_merge(default_data, options)) debug "Published AMQP message to #{routing_key}." rescue Exception => e - puts "AMQP publish exception: #{e.message}" + Amqp.logger.warn "ERROR: AMQP publish for #{routing_key} exception: #{e.message}" end protected