feat: enforce single-worker at startup
Fail with RuntimeError when WEB_CONCURRENCY or BANGUI_WORKERS > 1. In-memory session cache, rate-limit windows, and runtime state are process-local. Multi-worker silently causes stale limits, ghost sessions, inconsistent status. Skipped when TESTING=1. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -30,7 +30,7 @@ SINGLE-WORKER ENFORCEMENT:
|
||||
2. Database lock: Only one instance can run the scheduler at a time
|
||||
3. Startup validation: Fails loudly if multi-worker scenario is detected
|
||||
|
||||
See Docs/Architekture.md § Deployment Constraints for full details.
|
||||
See Docs/Deployment.md § Single-Worker Requirement for full details.
|
||||
|
||||
MULTI-WORKER SOLUTION (Future):
|
||||
To deploy BanGUI with multiple workers in the future (e.g., via gunicorn -w 4):
|
||||
|
||||
Reference in New Issue
Block a user