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

Function fireClock

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

Source from the content-addressed store, hash-verified

580 // --- Clock firing -----------------------------------------------------
581
582 const fireClock = (
583 executionId: string,
584 name: string,
585 deferredName: string
586 ): Effect.Effect<void> =>
587 Effect
588 .gen(function*() {
589 const encoded = yield* encodeDeferredExit(Exit.void)
590 const inserted = yield* sql
591 .withTransaction(Effect.gen(function*() {
592 const got = yield* createDeferred(executionId, deferredName, encoded)
593 yield* deleteClock(executionId, name)
594 return got
595 }))
596 .pipe(Effect.orDie)
597 if (inserted) yield* driveById(executionId)
598 })
599 .pipe(annotate("clockFire", executionId))
600
601 // --- Encoded engine ---------------------------------------------------
602

Callers 1

Calls 6

createDeferredFunction · 0.85
deleteClockFunction · 0.85
encodeDeferredExitFunction · 0.70
driveByIdFunction · 0.70
annotateFunction · 0.70
pipeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…