RED-4653: Corrected exception block to not swallow exceptions
This commit is contained in:
parent
5cdf4df4a3
commit
bbf013385a
@ -67,14 +67,16 @@ class QueueManager(object):
|
||||
|
||||
self.logger.info("Consuming from queue")
|
||||
self._consumer_token = None
|
||||
|
||||
try:
|
||||
self._consumer_token = self._channel.basic_consume(self._input_queue, callback)
|
||||
self.logger.info(f"Registered with consumer-tag: {self._consumer_token}")
|
||||
self._channel.start_consuming()
|
||||
except Exception as ex:
|
||||
except Exception:
|
||||
self.logger.warning(
|
||||
f"An unexpected exception occurred while consuming messages. Consuming will stop.\n{ex}"
|
||||
f"An unexpected exception occurred while consuming messages. Consuming will stop."
|
||||
)
|
||||
raise
|
||||
finally:
|
||||
self.stop_consuming()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user