We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e9d2a3c + cf08bf4 commit 9f49192Copy full SHA for 9f49192
utils/message_brokers.py
@@ -140,7 +140,7 @@ def receive_message(self) -> list[dict]:
140
# Check if connection to RabbitMQ is open, if not, reconnect
141
if not self.connection.is_open:
142
print("Connection to RabbitMQ is not open")
143
- self.Connect()
+ self.connect()
144
145
# Check if readChannel is closed, if yes, reinitialize
146
if self.readChannel.is_closed:
@@ -177,7 +177,7 @@ def send_message(self, message: str):
177
# Handle connection and channel closure exceptions
178
except pika.exceptions.ConnectionClosed:
179
print('Reconnecting to queue')
180
181
self.publishChannel.basic_publish(
182
exchange=self.exchange, routing_key=self.target_queue_name, body=message)
183
except pika.exceptions.ChannelClosed:
0 commit comments