fix(server): run orchestrator in module scope to survive WS disconnect

This commit is contained in:
2026-05-26 14:51:09 +04:00
parent 2165d1b899
commit 3d95a946a8
@@ -193,7 +193,7 @@ class GlobalStreamHandler(private val module: ServerModule) {
}
val sessionId: SessionId = TypeId(UUID.randomUUID().toString())
log.info("starting session={} workflow={}", sessionId.value, msg.workflowId)
session.launch {
module.moduleScope.launch {
runCatching { module.orchestrator.run(sessionId, graph, module.defaultOrchestrationConfig) }
.onFailure { ex ->
log.error("run failed for session={}: {}", sessionId.value, ex.message, ex)