Skip to content

Commit

Permalink
Add more logging to troubleshoot blocking connection usage
Browse files Browse the repository at this point in the history
  • Loading branch information
NeonDaniel committed Jan 21, 2025
1 parent f151d8d commit a4d9083
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion neon_mq_connector/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,9 +321,10 @@ def _on_channel_open(new_channel):
new_channel.close()

if isinstance(connection, pika.BlockingConnection):
LOG.info("Using blocking connection")
LOG.info(f"Using blocking connection for queue: {queue}")
_on_channel_open(connection.channel())
else:
LOG.info(f"Using select connection for queue: {queue}")
connection.channel(on_open_callback=_on_channel_open)

LOG.debug(f"sent message: {request_data['message_id']}")
Expand Down

0 comments on commit a4d9083

Please sign in to comment.