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

Function readExec

packages/infra/src/WorkflowEngineCosmos.ts:230–239  ·  view source on GitHub ↗
(executionId: string)

Source from the content-addressed store, hash-verified

228 // --- Cosmos primitives -------------------------------------------------
229
230 const readExec = (executionId: string) =>
231 Effect
232 .gen(function*() {
233 const resp = yield* Effect.promise(() => container.item(execId, executionId).read<ExecDoc>())
234 yield* annotateCosmosResponse({ requestCharge: resp.requestCharge, statusCode: resp.statusCode })
235 return Option.fromNullishOr(resp.resource).pipe(
236 Option.map((r) => ({ ...r, _etag: resp.etag }))
237 )
238 })
239 .pipe(annotate("readExec", executionId))
240
241 const replaceExec = (doc: ExecDoc) =>
242 Effect

Callers 5

heartbeatFunction · 0.70
driveFunction · 0.70
driveByIdFunction · 0.70
markInterruptedFunction · 0.70

Calls 6

annotateCosmosResponseFunction · 0.90
readMethod · 0.80
itemMethod · 0.80
annotateFunction · 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…