Skip to content

Commit

Permalink
Logging
Browse files Browse the repository at this point in the history
  • Loading branch information
bskjon committed Dec 29, 2024
1 parent 2bc6e91 commit 5cf7dff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/pyMetadata/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def __connect_to_datasource(self) -> bool:
password=events_server_password
)
if myConnection.is_connected():
logging.info(f"Successfully connected to {events_server_database_name} at {events_server_address}:{events_server_port}")
logging.debug(f"Successfully connected to {events_server_database_name} at {events_server_address}:{events_server_port}")
self.connection = myConnection
return True
else:
Expand Down Expand Up @@ -159,9 +159,9 @@ def run(self) -> None:
producedMessage: bool = False

while not self.shutdown.is_set() and self.__has_connection_to_database() != True:
logging.info("Attempting to reconnect to the database...")
logging.debug("Attempting to reconnect to the database...")
if (self.__connect_to_datasource() == False):
logger.info("Waiting 5 seconds before retrying")
logger.info("Failed to connect to database, waiting 5 seconds before retrying")
time.sleep(5) # Wait 5 seconds before retrying
else:
logging.debug("A successful connection has been made!")
Expand Down

0 comments on commit 5cf7dff

Please sign in to comment.