From 7b6408e0dee574f402d639fc6beca8f0e06efb74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20K=C3=B6ssler?= Date: Thu, 11 Jul 2024 11:04:02 +0200 Subject: [PATCH] feat: wip for multiple tenants - for pkg build --- pyinfra/queue/threaded_tenants.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyinfra/queue/threaded_tenants.py b/pyinfra/queue/threaded_tenants.py index 55eea3e..9a00de4 100644 --- a/pyinfra/queue/threaded_tenants.py +++ b/pyinfra/queue/threaded_tenants.py @@ -112,7 +112,7 @@ class TenantQueueManager(BaseQueueManager): self.tenant_events_dlq_name = self.get_tenant_events_dlq_name(settings) def initialize_queues(self) -> None: - self.channel.exchange_declare(exchange=self.tenant_exchange_name, exchange_type="topic") + self.channel.exchange_declare(exchange=self.tenant_exchange_name, exchange_type="topic", durable=True) self.channel.queue_declare( queue=self.tenant_created_queue_name, @@ -312,7 +312,7 @@ class ServiceQueueManager(BaseQueueManager): on_message_callback = self._make_on_message_callback(message_processor, tenant_id) on_message_callback(self.channel, method_frame, properties, body) else: - # logger.debug(f"No message returned for queue {queue_name}") + logger.debug(f"No message returned for queue {queue_name}") # time.sleep(self.connection_sleep) time.sleep(0.1)