mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-14 02:29:33 +01:00
The cap of 50 concurrent sessions was a hard-coded constant, so a machine with the memory for more (or a small box that wants fewer) had to patch the source. CODEMAN_MAX_SESSIONS now sets it at startup. The default stays 50, and anything that is not a positive integer (empty, 0, negative, fractional, 1e3, out of safe-integer range) falls back to it, so a typo never locks session creation. Every site keeps reading MAX_CONCURRENT_SESSIONS, so the session routes, cron launches, the scheduled-run loop and the multi-user per-user cap (half the global cap unless CODEMAN_MAX_SESSIONS_PER_USER is set) all follow the variable. The test goes through sessionCapacityState and sessionCapacityMessage, the check every session-creating route uses. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>