Skip to content

Send a phone call from AI agent, in an API call. Or, directly call the bot from the configured phone number!

Python

perf: Add default request and shutdown timeout to 60 secs

Clémence Lesné1ab2905d952f
diff --git a/Makefile b/Makefile
index da855aa..2ad0172 100644
--- a/Makefile
+++ b/Makefile
@@ -110,10 +110,12 @@ dev:
VERSION=$(version_full) PUBLIC_DOMAIN=$(tunnel_url) uv run gunicorn app.main:api \
--access-logfile - \
--bind 0.0.0.0:8080 \
+ --graceful-timeout 60 \
--proxy-protocol \
--reload \
--reload-extra-file .env \
--reload-extra-file config.yaml \
+ --timeout 60 \
--worker-class uvicorn.workers.UvicornWorker \
--workers 2
diff --git a/cicd/Dockerfile b/cicd/Dockerfile
index 1af87e4..a8067c3 100644
--- a/cicd/Dockerfile
+++ b/cicd/Dockerfile
@@ -24,4 +24,4 @@ USER appuser
ENV PATH=/app/.venv/bin:$PATH
-CMD ["bash", "-c", "gunicorn app.main:api --bind 0.0.0.0:8080 --proxy-protocol --workers 4 --worker-class uvicorn.workers.UvicornWorker"]
+CMD ["bash", "-c", "gunicorn app.main:api --bind 0.0.0.0:8080 --graceful-timeout 60 --proxy-protocol --timeout 60 --worker-class uvicorn.workers.UvicornWorker --workers 4"]