From 502352b77087c044ebec9270c4290540e26c9f9a Mon Sep 17 00:00:00 2001 From: DanielePalaia Date: Tue, 11 Mar 2025 16:30:00 +0100 Subject: [PATCH] review logs --- rabbitmq_amqp_python_client/connection.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/rabbitmq_amqp_python_client/connection.py b/rabbitmq_amqp_python_client/connection.py index d43e2a4..884c82f 100644 --- a/rabbitmq_amqp_python_client/connection.py +++ b/rabbitmq_amqp_python_client/connection.py @@ -108,6 +108,7 @@ def _set_environment_connection_list(self, connections: []): # type: ignore def _open_connections(self, reconnect_handlers: bool = False) -> None: + logger.debug("inside connection._open_connections creating connection") if self._recovery_configuration.active_recovery is False: self._conn = BlockingConnection( url=self._addr, @@ -123,7 +124,7 @@ def _open_connections(self, reconnect_handlers: bool = False) -> None: ) if reconnect_handlers is True: - + logger.debug("reconnecting managements, publishers and consumers handlers") for i, management in enumerate(self._managements): # Update the broken connection and sender in the management self._managements[i]._update_connection(self._conn) @@ -206,10 +207,6 @@ def _win_store_to_cert( typing_extensions.assert_never(store) return ca_cert - def _open(self) -> None: - self._management = Management(self._conn) - self._management.open() - def management(self) -> Management: """ Get the management interface for this connection. @@ -329,7 +326,7 @@ def _on_disconnection(self) -> None: except ConnectionException as e: base_delay *= 2 - logger.debug( + logger.error( "Reconnection attempt failed", "attempt", attempt, @@ -338,7 +335,7 @@ def _on_disconnection(self) -> None: ) # maximum attempts reached without establishing a connection if attempt == self._recovery_configuration.MaxReconnectAttempts - 1: - logger.debug("Not able to reconnect") + logger.error("Not able to reconnect") raise ConnectionException else: continue