Merge branch 'feature/RES-840-add-client-connector-error' into 'master'

feat: add ClientConnectorError

See merge request knecon/research/pyinfra!93
This commit is contained in:
Jonathan Kössler 2024-08-28 14:39:40 +02:00
commit facb9726f9
2 changed files with 3 additions and 3 deletions

View File

@ -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:

View File

@ -1,6 +1,6 @@
[tool.poetry]
name = "pyinfra"
version = "3.2.4"
version = "3.2.5"
description = ""
authors = ["Team Research <research@knecon.com>"]
license = "All rights reseverd"