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

Function leaseActive

packages/infra/src/WorkflowEngineSqlite.ts:457–461  ·  view source on GitHub ↗
(state: ExecState, now: number)

Source from the content-addressed store, hash-verified

455 // --- Lease / claim ----------------------------------------------------
456
457 const leaseActive = (state: ExecState, now: number): boolean =>
458 state.worker !== undefined
459 && state.worker !== workerId
460 && state.leaseExpiresAt !== undefined
461 && state.leaseExpiresAt > now
462
463 const tryClaim = (state: ExecState): Effect.Effect<Option.Option<ExecState>> =>
464 Effect.gen(function*() {

Callers 1

tryClaimFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…