Skip to content

Commit

Permalink
Set HTTP client timeout to 300 seconds in FastAPI lifespan
Browse files Browse the repository at this point in the history
  • Loading branch information
sigurdp committed Nov 22, 2024
1 parent 5e4f0b9 commit bf04ecd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend_py/primary/primary/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit bf04ecd

Please sign in to comment.