MCPcopy Create free account
hub / github.com/Effect-TS/effect / closeRuns

Function closeRuns

packages/effect/src/cluster/ClusterWorkflowEngine.ts:144–152  ·  view source on GitHub ↗
(state: ActivationState, abandoned: boolean)

Source from the content-addressed store, hash-verified

142 // skip superseded compensations. Abandonment releases owner-local resources
143 // without running durable finalizers, so the run can replay elsewhere.
144 const closeRuns = (state: ActivationState, abandoned: boolean) =>
145 Effect.suspend(() => {
146 const scope = state.scope
147 if (abandoned) {
148 markScopeAbandoned(scope)
149 }
150 state.scope = Scope.makeUnsafe()
151 return Scope.close(scope, Exit.void)
152 })
153 const clients = yield* RcMap.make({
154 lookup: Effect.fnUntraced(function*(workflowName: string) {
155 const entity = entities.get(workflowName)

Callers 1

Calls 2

markScopeAbandonedFunction · 0.90
closeMethod · 0.65

Tested by

no test coverage detected