From b6a2069a6ac6e56afab427135e0be44999a2c86d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonathan=20K=C3=B6ssler?= Date: Wed, 28 Aug 2024 10:28:12 +0200 Subject: [PATCH] feat: add ClientConnectorError --- pyinfra/queue/async_manager.py | 4 ++-- pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pyinfra/queue/async_manager.py b/pyinfra/queue/async_manager.py index fddf40d..c86e88d 100644 --- a/pyinfra/queue/async_manager.py +++ b/pyinfra/queue/async_manager.py @@ -214,7 +214,7 @@ class AsyncQueueManager: @retry( stop=stop_after_attempt(5), wait=wait_exponential_jitter(initial=1, max=10), - retry=retry_if_exception_type(aiohttp.ClientResponseError), + retry=retry_if_exception_type((aiohttp.ClientResponseError, aiohttp.ClientConnectorError)), reraise=True, ) async def fetch_active_tenants(self) -> Set[str]: @@ -233,7 +233,7 @@ class AsyncQueueManager: async def initialize_tenant_queues(self) -> None: try: active_tenants = await self.fetch_active_tenants() - except aiohttp.ClientResponseError: + except (aiohttp.ClientResponseError, aiohttp.ClientConnectorError): logger.warning("API calls to tenant server failed. No tenant queues initialized.") active_tenants = set() for tenant_id in active_tenants: diff --git a/pyproject.toml b/pyproject.toml index d477465..23d0d1c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "pyinfra" -version = "3.2.4" +version = "3.2.5" description = "" authors = ["Team Research "] license = "All rights reseverd"