From 6e9dd31f0fbf8bdf8f0248d25bd90d4dd69c63c3 Mon Sep 17 00:00:00 2001 From: Jorrit Schaap <schaap@astron.nl> Date: Tue, 14 Jul 2020 12:46:53 +0200 Subject: [PATCH] TMSS-152: removed print statement again for debugging the failing build pipeline --- LCS/Messaging/python/messaging/config.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/LCS/Messaging/python/messaging/config.py b/LCS/Messaging/python/messaging/config.py index 29c1a05413f..e7f350333f5 100644 --- a/LCS/Messaging/python/messaging/config.py +++ b/LCS/Messaging/python/messaging/config.py @@ -36,9 +36,7 @@ if isProductionEnvironment() or isTestEnvironment(): def broker_url(hostname: str=DEFAULT_BROKER, port: int=DEFAULT_PORT, userid: str=DEFAULT_USER, password :str=DEFAULT_PASSWORD) -> str: - url = 'amqp://%s:%s@%s:%d//' % (userid, password, hostname, port) - print(url) - return url + return 'amqp://%s:%s@%s:%d//' % (userid, password, hostname, port) if DEFAULT_PORT == -1: possible_ports = [5672, 5675] @@ -50,13 +48,13 @@ else: for port in possible_ports: try: - print("trying to connect to broker: hostname=%s port=%s userid=%s password=***" % ( - DEFAULT_BROKER, port, DEFAULT_USER)) + logger.debug("trying to connect to broker: hostname=%s port=%s userid=%s password=***", + DEFAULT_BROKER, port, DEFAULT_USER) with kombu.Connection(broker_url(port=port), max_retries=0, connect_timeout=1, ) as connection: connection.connect() DEFAULT_PORT = port - print("detected rabbitmq broker to which we can connect with hostname=%s port=%s userid=%s password=***" % ( - DEFAULT_BROKER, port, DEFAULT_USER)) + logger.info("detected rabbitmq broker to which we can connect with hostname=%s port=%s userid=%s password=***", + DEFAULT_BROKER, port, DEFAULT_USER) break except Exception as e: logger.debug("cannot connect to broker: hostname=%s port=%s userid=%s password=*** error=%s", -- GitLab