Monorepo for Tangled

spindle: cap total concurrent workflow memory via semaphore master

Add MaxConcurrentWorkflows config (SPINDLE_SERVER_MAX_CONCURRENT_WORKFLOWS, default 8) that limits how many workflow containers run simultaneously. Combined with the 6 GiB per-container limit this keeps total container memory under ~48 GiB on the current 64 GiB host. A channel-based semaphore is initialized in New() and passed into StartWorkflows, where each workflow goroutine acquires a slot before calling SetupWorkflow and releases it on exit. Signed-off-by: Anirudh Oppiliappan <anirudh@tangled.org>


Author Anirudh Oppiliappan Date Commit 9cfc3f59 Parent ccca4347 Change ID smmqnmyn
+27 -17
3 changed files