RED-4653: Changed code to close only the connection instead of the channel & connection to see if that is sufficient for a clean shutdown

This commit is contained in:
Viktor Seifert 2022-08-01 13:39:09 +02:00
parent 76985e83ed
commit 2cffab279d

View File

@ -58,10 +58,7 @@ class QueueManager(object):
self._channel.queue_declare(self._output_queue, arguments=args, auto_delete=False, durable=True)
def _close_channel(self):
self._channel.close()
if environ.get("CLOSE_CONNECTION", False) == "True":
self._connection.close()
self._connection.close()
def start_consuming(self, process_message_callback: Callable):
self._open_channel()