From b9258de347ca8caabef25b3bfd12a943b4c37a44 Mon Sep 17 00:00:00 2001 From: Julius Unverfehrt Date: Tue, 15 Feb 2022 09:43:45 +0100 Subject: [PATCH] bluck --- mini_queue/run.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/mini_queue/run.py b/mini_queue/run.py index 701791f..aeeb1c2 100644 --- a/mini_queue/run.py +++ b/mini_queue/run.py @@ -33,14 +33,14 @@ def main(): parameters = init_params() connection = pika.BlockingConnection(parameters) channel = connection.channel() - #channel.queue_declare(queue=CONFIG.rabbitmq.queues.output, durable=True) + # channel.queue_declare(queue=CONFIG.rabbitmq.queues.output, durable=True) while True: try: channel.basic_consume(queue=CONFIG.rabbitmq.queues.input, auto_ack=False, on_message_callback=callback) logging.info(" [*] Waiting for messages. To exit press CTRL+C") channel.start_consuming() - + except pika.exceptions.ConnectionClosedByBroker as err: logging.info("Caught a channel error: {}, stopping...".format(err)) continue @@ -51,10 +51,8 @@ def main(): logging.info("Connection was closed, retrying...") continue - - if __name__ == "__main__": logging_level = CONFIG.service.logging_level logging.basicConfig(level=logging_level) - main() \ No newline at end of file + main()