RED-4653: Added some debugging code to test if closing the connection needed
This commit is contained in:
parent
bbf013385a
commit
76985e83ed
@ -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()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user