From 2cffab279db2f38787d0f97dfb9d106b8d5d164f Mon Sep 17 00:00:00 2001 From: Viktor Seifert Date: Mon, 1 Aug 2022 13:39:09 +0200 Subject: [PATCH] RED-4653: Changed code to close only the connection instead of the channel & connection to see if that is sufficient for a clean shutdown --- pyinfra/queue/queue_manager.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pyinfra/queue/queue_manager.py b/pyinfra/queue/queue_manager.py index 5021114..a60159b 100644 --- a/pyinfra/queue/queue_manager.py +++ b/pyinfra/queue/queue_manager.py @@ -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()