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

Function upsertActivity

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

Source from the content-addressed store, hash-verified

362 // Overwrites a previously persisted *suspended* activity result so the next
363 // attempt can record its real outcome.
364 const upsertActivity = (
365 executionId: string,
366 name: string,
367 attempt: number,
368 encoded: string
369 ): Effect.Effect<void> =>
370 exec(
371 `INSERT INTO "${activityTable}" (execution_id, name, attempt, result)
372 VALUES (?, ?, ?, ?)
373 ON CONFLICT(execution_id, name, attempt) DO UPDATE SET result = excluded.result`,
374 [executionId, name, attempt, encoded]
375 )
376 .pipe(Effect.asVoid)
377
378 const readActivity = (
379 executionId: string,

Callers 1

Calls 2

execFunction · 0.70
pipeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…