RED-4653: Added some debugging code to test if closing the connection needed

This commit is contained in:
Viktor Seifert 2022-08-01 13:25:53 +02:00
parent bbf013385a
commit 76985e83ed

View File

@ -3,6 +3,7 @@ import json
import logging
import signal
from typing import Callable
from os import environ
import pika
import pika.exceptions
@ -58,7 +59,9 @@ class QueueManager(object):
def _close_channel(self):
self._channel.close()
self._connection.close()
if environ.get("CLOSE_CONNECTION", False) == "True":
self._connection.close()
def start_consuming(self, process_message_callback: Callable):
self._open_channel()