"""Gunicorn configuration for the schedule service. Workers MUST stay at 1: the embedded APScheduler and the Outbox poller must not run twice in the same container. """ import os bind = os.getenv("GUNICORN_BIND", "0.0.0.0:8000") workers = int(os.getenv("GUNICORN_WORKERS", "1")) worker_class = "uvicorn.workers.UvicornWorker" # 0 disables gunicorn worker heartbeat timeout — needed because # NodeExecutor runs notebooks synchronously. timeout = int(os.getenv("GUNICORN_TIMEOUT", "0")) graceful_timeout = int(os.getenv("GUNICORN_GRACEFUL_TIMEOUT", "30")) accesslog = "-" errorlog = "-"