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()