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

Function readActivity

packages/infra/src/WorkflowEngineSqlite.ts:378–392  ·  view source on GitHub ↗
(
    executionId: string,
    name: string,
    attempt: number
  )

Source from the content-addressed store, hash-verified

376 .pipe(Effect.asVoid)
377
378 const readActivity = (
379 executionId: string,
380 name: string,
381 attempt: number
382 ): Effect.Effect<Option.Option<string>> =>
383 exec(
384 `SELECT result FROM "${activityTable}" WHERE execution_id = ? AND name = ? AND attempt = ?`,
385 [executionId, name, attempt]
386 )
387 .pipe(
388 Effect.map((rows) => {
389 const r = (rows as ReadonlyArray<{ result: string }>)[0]
390 return r ? Option.some(r.result) : Option.none<string>()
391 })
392 )
393
394 const createDeferred = (
395 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…