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>
Schedule Executor
独立调度执行服务,内置 APScheduler。
- Cron 任务持久化到 MySQL 的
apscheduler_jobs表; - FastAPI Backend 创建运行记录和 Outbox 事件后,通过 HTTP 尝试立即推送;
- HTTP 推送失败时,Executor 继续轮询 MySQL
outbox_events,保证任务不会丢失; - Executor 负责 DAG 节点派发、稳定版本执行、重试、状态推进和结果回写;
- 不依赖 Redis,MySQL 是调度状态与幂等状态的唯一权威。