handleStopping 处理停止
(ctx *actor.Context)
| 573 | |
| 574 | // handleStopping 处理停止 |
| 575 | func (c *CoordinatorActor) handleStopping(ctx *actor.Context) { |
| 576 | // 取消所有运行中的工作流 |
| 577 | c.mu.Lock() |
| 578 | for _, state := range c.runningWorkflows { |
| 579 | if state.execution.cancelFunc != nil { |
| 580 | state.execution.cancelFunc() |
| 581 | } |
| 582 | } |
| 583 | c.runningWorkflows = make(map[string]*workflowState) |
| 584 | c.mu.Unlock() |
| 585 | } |
| 586 | |
| 587 | // 辅助方法 |
| 588 | func (c *CoordinatorActor) findStartNodes(def *WorkflowDefinition) []string { |