diff --git a/pyinfra/queue/async_manager.py b/pyinfra/queue/async_manager.py index e0c82c5..b15b2df 100644 --- a/pyinfra/queue/async_manager.py +++ b/pyinfra/queue/async_manager.py @@ -273,15 +273,20 @@ class AsyncQueueManager: @retry( tries=5, - exceptions=(AMQPConnectionError, ChannelInvalidStateError), + exceptions=( + AMQPConnectionError, + ChannelInvalidStateError, + aiohttp.ClientResponseError, + aiohttp.ClientConnectorError, + ), reraise=True, ) async def initialize_tenant_queues(self) -> None: try: active_tenants = await self.fetch_active_tenants() except (aiohttp.ClientResponseError, aiohttp.ClientConnectorError): - logger.warning("API calls to tenant server failed. No tenant queues initialized.", exc_info=True) - active_tenants = set() + logger.error("API calls to tenant server failed. No tenant queues initialized.", exc_info=True) + raise asyncio.CancelledError for tenant_id in active_tenants: await self.create_tenant_queues(tenant_id)