diff --git a/src/webmonchow/amq/broadcast.py b/src/webmonchow/amq/broadcast.py index d5d3420..3b0b235 100644 --- a/src/webmonchow/amq/broadcast.py +++ b/src/webmonchow/amq/broadcast.py @@ -109,6 +109,7 @@ def connect_to_broker(broker, user, password, attempts=None, interval=5.0): while attempts is None or attempt_number < attempts: try: conn = conn.connect(user, password, wait=True) + print(f"Connected to {broker}") return conn except stomp.exception.ConnectFailedException as e: attempt_number += 1 diff --git a/src/webmonchow/pv/broadcast.py b/src/webmonchow/pv/broadcast.py index 1a65d74..0bec5dd 100644 --- a/src/webmonchow/pv/broadcast.py +++ b/src/webmonchow/pv/broadcast.py @@ -134,6 +134,7 @@ def connect_to_database(database, user, password, host, port, attempts=None, int while attempts is None or attempt_number < attempts: try: conn = psycopg2.connect(database=database, user=user, password=password, host=host, port=port) + print(f"Connected to {database}") return conn except psycopg2.OperationalError as e: attempt_number += 1