"""Single-process runtime: ControllerService owns one local coordinator.""" from __future__ import annotations import sys from controller.config import load_config _web_config = load_config().web bind = f"{_web_config.host}:{_web_config.port}" workers = 1 worker_class = "gthread" threads = 4 preload_app = False accesslog = "-" errorlog = "-" capture_output = True timeout = 30 graceful_timeout = 30 worker_tmp_dir = "/tmp" control_socket_disable = True def worker_exit(server, worker): # pragma: no cover - exercised by Gunicorn module = sys.modules.get("wsgi") service = getattr(module, "service", None) if service is None: return service.stop()