From bf04ecd2ecdc73cee71bb2cee5f341090903a8a5 Mon Sep 17 00:00:00 2001 From: Sigurd Pettersen Date: Fri, 22 Nov 2024 11:28:30 +0100 Subject: [PATCH] Set HTTP client timeout to 300 seconds in FastAPI lifespan --- backend_py/primary/primary/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend_py/primary/primary/main.py b/backend_py/primary/primary/main.py index 477d3af50..4e1301b8a 100644 --- a/backend_py/primary/primary/main.py +++ b/backend_py/primary/primary/main.py @@ -70,7 +70,7 @@ async def app_lifespan(app: FastAPI): #app.state.requests_client = httpx.AsyncClient(http2=True, verify=False, limits=limits) #app.state.requests_client = httpx.AsyncClient(verify=False) - app.state.requests_client = httpx.AsyncClient() + app.state.requests_client = httpx.AsyncClient(timeout=300) yield await app.state.requests_client.aclose()