Skip to content

Commit 1820fbe

Browse files
authored
fix(server): stop event subscribers before closing the database (#27831)
Co-authored-by: maria-rcks <[email protected]>
1 parent 1854e14 commit 1820fbe

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎apps/server/src/orchestration-v2/Orchestrator.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13398,7 +13398,7 @@ const makeOrchestrator = Effect.fn("orchestrationV2.Orchestrator.layer")(functio
1339813398
stored.event.payload.status === "rolled_back"),
1339913399
),
1340013400
Stream.runForEach(handleRunUpdate),
13401-
Effect.forkDetach,
13401+
Effect.forkScoped,
1340213402
);
1340313403

1340413404
// A child whose run ends while its background tasks or its own subagents still run has no
@@ -13440,7 +13440,7 @@ const makeOrchestrator = Effect.fn("orchestrationV2.Orchestrator.layer")(functio
1344013440
),
1344113441
),
1344213442
),
13443-
Effect.forkDetach,
13443+
Effect.forkScoped,
1344413444
);
1344513445

1344613446
const recoverDelegatedTasks = Effect.gen(function* () {

0 commit comments

Comments
 (0)