build: switch services to gunicorn with per-service config
Replace uvicorn with gunicorn + UvicornWorker in backend, runtime, and schedule Dockerfiles. New gunicorn.conf.py per service exposes bind/workers/timeout/graceful_timeout as GUNICORN_* env knobs. Notable details: - schedule: timeout=0 (disables gunicorn worker heartbeat) so long notebook execution isn't killed by gunicorn's silent-worker kill. - All three configs: drop dead threads=4 setting; UvicornWorker is async and ignores threads. - Pin gunicorn>=26.0.0 in each pyproject; uv.lock regenerated. - Drop stale 'COPY contracts ./contracts' from runtime and schedule Dockerfiles (contracts dir was deleted in an earlier refactor; builds would have failed). - backend Dockerfile: switch to uv sync layout matching runtime/ schedule; add build deps for native wheels. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -198,6 +198,7 @@ dependencies = [
|
||||
{ name = "croniter" },
|
||||
{ name = "cryptography" },
|
||||
{ name = "fastapi" },
|
||||
{ name = "gunicorn" },
|
||||
{ name = "httpx" },
|
||||
{ name = "uvicorn", extra = ["standard"] },
|
||||
]
|
||||
@@ -209,6 +210,7 @@ requires-dist = [
|
||||
{ name = "croniter", specifier = "==6.2.4" },
|
||||
{ name = "cryptography", specifier = "==49.0.0" },
|
||||
{ name = "fastapi", specifier = "==0.116.1" },
|
||||
{ name = "gunicorn", specifier = ">=26.0.0" },
|
||||
{ name = "httpx", specifier = "==0.28.1" },
|
||||
{ name = "uvicorn", extras = ["standard"], specifier = "==0.35.0" },
|
||||
]
|
||||
@@ -690,6 +692,18 @@ wheels = [
|
||||
{ url = "https://pypi.tuna.tsinghua.edu.cn/packages/93/e8/65e8707d00fe2a49bf12f609a9b2b39ba6dd23c2810eacad877c4fc94bfe/greenlet-3.5.4-cp315-cp315t-win_arm64.whl", hash = "sha256:08fc36de8442d5c3e95b044550dbea9bf144d31ec0cc58e36fb241cb6ef6a994", size = 250538, upload-time = "2026-07-22T11:40:17.985Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "gunicorn"
|
||||
version = "26.0.0"
|
||||
source = { registry = "https://pypi.tuna.tsinghua.edu.cn/simple/" }
|
||||
dependencies = [
|
||||
{ name = "packaging" },
|
||||
]
|
||||
sdist = { url = "https://pypi.tuna.tsinghua.edu.cn/packages/6d/b7/a4a3f632f823e432ce6bc65f62961b7980c898c77f075a2f7118cb3846fe/gunicorn-26.0.0.tar.gz", hash = "sha256:ca9346f85e3a4aeeb64d491045c16b9a35647abd37ea15efe53080eb8b090baf", size = 727286, upload-time = "2026-05-05T06:38:25.529Z" }
|
||||
wheels = [
|
||||
{ url = "https://pypi.tuna.tsinghua.edu.cn/packages/e6/40/9c2384fc2be4ad25dd4a49decd5ad9ea5a3639814c11bd40ab77cb9f0a14/gunicorn-26.0.0-py3-none-any.whl", hash = "sha256:40233d26a5f0d1872916188c276e21641155111c2853f0c2cd55260aec0d24fc", size = 212009, upload-time = "2026-05-05T06:38:23.007Z" },
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "h11"
|
||||
version = "0.16.0"
|
||||
@@ -1864,6 +1878,7 @@ source = { editable = "runtime" }
|
||||
dependencies = [
|
||||
{ name = "common" },
|
||||
{ name = "fastapi" },
|
||||
{ name = "gunicorn" },
|
||||
{ name = "httpx" },
|
||||
{ name = "loguru" },
|
||||
{ name = "notebook" },
|
||||
@@ -1874,6 +1889,7 @@ dependencies = [
|
||||
requires-dist = [
|
||||
{ name = "common", editable = "common" },
|
||||
{ name = "fastapi", specifier = "==0.116.1" },
|
||||
{ name = "gunicorn", specifier = ">=26.0.0" },
|
||||
{ name = "httpx", specifier = "==0.28.1" },
|
||||
{ name = "loguru", specifier = "==0.7.2" },
|
||||
{ name = "notebook" },
|
||||
@@ -1900,6 +1916,7 @@ dependencies = [
|
||||
{ name = "apscheduler" },
|
||||
{ name = "common" },
|
||||
{ name = "fastapi" },
|
||||
{ name = "gunicorn" },
|
||||
{ name = "httpx" },
|
||||
{ name = "ipykernel" },
|
||||
{ name = "nbclient" },
|
||||
@@ -1913,6 +1930,7 @@ requires-dist = [
|
||||
{ name = "apscheduler", specifier = "==3.11.3" },
|
||||
{ name = "common", editable = "common" },
|
||||
{ name = "fastapi", specifier = "==0.116.1" },
|
||||
{ name = "gunicorn", specifier = ">=26.0.0" },
|
||||
{ name = "httpx", specifier = "==0.28.1" },
|
||||
{ name = "ipykernel", specifier = "==6.29.5" },
|
||||
{ name = "nbclient", specifier = "==0.10.2" },
|
||||
|
||||
Reference in New Issue
Block a user