* Shut down all active flows — resolves each with an error. * * Mirrors the `dispose` pattern where services iterate all flows * and finish them with `Err("App shutting down")`.
()
| 208 | * and finish them with `Err("App shutting down")`. |
| 209 | */ |
| 210 | async shutdownAll(): Promise<void> { |
| 211 | const flowIds = [...this.flows.keys()]; |
| 212 | await Promise.all(flowIds.map((id) => this.finish(id, Err("App shutting down")))); |
| 213 | } |
| 214 | } |