From 128e0a783549454d089569dc8235aeb0b41086bd Mon Sep 17 00:00:00 2001 From: Christian Stefanescu Date: Tue, 30 Jul 2024 13:18:27 +0200 Subject: [PATCH] Properly declare queues --- servicelayer/taskqueue.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/servicelayer/taskqueue.py b/servicelayer/taskqueue.py index a623d1c..3413a6b 100644 --- a/servicelayer/taskqueue.py +++ b/servicelayer/taskqueue.py @@ -705,12 +705,14 @@ def consume_queue(queue): for method, properties, body in channel.consume( queue, inactivity_timeout=10, - prefetch_count=self.prefetch_count_mapping[queue], ): if method: self.on_message(channel, method, properties, body) for queue in self.queues: + declare_rabbitmq_queue( + channel, queue, prefetch_count=self.prefetch_count_mapping[queue] + ) thread = threading.Thread(target=consume_queue, args=(queue,)) thread.daemon = True thread.start()