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

Function readDeferred

packages/infra/src/WorkflowEngineSqlite.ts:408–421  ·  view source on GitHub ↗
(
    executionId: string,
    name: string
  )

Source from the content-addressed store, hash-verified

406 .pipe(Effect.map((rows) => (rows as ReadonlyArray<unknown>).length > 0))
407
408 const readDeferred = (
409 executionId: string,
410 name: string
411 ): Effect.Effect<Option.Option<string>> =>
412 exec(
413 `SELECT exit FROM "${deferredTable}" WHERE execution_id = ? AND name = ?`,
414 [executionId, name]
415 )
416 .pipe(
417 Effect.map((rows) => {
418 const r = (rows as ReadonlyArray<{ exit: string }>)[0]
419 return r ? Option.some(r.exit) : Option.none<string>()
420 })
421 )
422
423 const insertClock = (
424 executionId: string,

Callers 1

Calls 4

someMethod · 0.80
execFunction · 0.70
pipeMethod · 0.65
mapMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…