fix(server): run orchestrator in module scope to survive WS disconnect
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user