MCPcopy Create free account
hub / github.com/effect-app/libs / waitForStep

Function waitForStep

packages/infra/test/cluster-sqlite.test.ts:194–201  ·  view source on GitHub ↗
(log: StepLog["Service"], step: string)

Source from the content-addressed store, hash-verified

192 }
193 return yield* Effect.fail(new Error(`Workflow ${executionId} did not complete`))
194 })
195
196const waitForStep = (log: StepLog["Service"], step: string) =>
197 Effect.gen(function*() {
198 for (let i = 0; i < 100; i++) {
199 if (log.steps.includes(step)) return
200 yield* Effect.sleep(Duration.millis(100))
201 }
202 return yield* Effect.fail(new Error(`Workflow did not reach ${step}`))
203 })
204

Callers 1

Calls 2

sleepMethod · 0.65
failMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…