Skip to content

Commit

Permalink
Merge pull request #1 from uug-ai/fix/wrong-method-reconnecting
Browse files Browse the repository at this point in the history
fix / connect method (no uppercase)
  • Loading branch information
cedricve authored Jan 9, 2025
2 parents e9d2a3c + cf08bf4 commit 9f49192
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions utils/message_brokers.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def receive_message(self) -> list[dict]:
# Check if connection to RabbitMQ is open, if not, reconnect
if not self.connection.is_open:
print("Connection to RabbitMQ is not open")
self.Connect()
self.connect()

# Check if readChannel is closed, if yes, reinitialize
if self.readChannel.is_closed:
Expand Down Expand Up @@ -177,7 +177,7 @@ def send_message(self, message: str):
# Handle connection and channel closure exceptions
except pika.exceptions.ConnectionClosed:
print('Reconnecting to queue')
self.Connect()
self.connect()
self.publishChannel.basic_publish(
exchange=self.exchange, routing_key=self.target_queue_name, body=message)
except pika.exceptions.ChannelClosed:
Expand Down

0 comments on commit 9f49192

Please sign in to comment.