LockOptions
Defined in: src/lock.ts:107
Properties
Section titled “Properties”key: (
context) =>string
Defined in: src/lock.ts:110
Lock key for this execution, e.g. () => 'nightly-report' or (ctx) => \order:${ctx.operationKey}``.
Parameters
Section titled “Parameters”context
Section titled “context”Returns
Section titled “Returns”string
optionalname?:string
Defined in: src/lock.ts:108
onLockLost?
Section titled “onLockLost?”
optionalonLockLost?: (args) =>MaybePromise<void>
Defined in: src/lock.ts:118
Called when renewal fails; the callback’s signal is then aborted with a LockLostError.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”MaybePromise<void>
store?
Section titled “store?”
optionalstore?:LockStore
Defined in: src/lock.ts:112
Default: an in-memory store shared by every lock on the same clock (the pipeline’s time provider). Use a distributed store to lock across processes.
optionalttl?:Duration
Defined in: src/lock.ts:114
Lease length. Renewed every ttl/3 while the callback runs. Default 30 s.
optionalwait?:Duration
Defined in: src/lock.ts:116
How long to wait for a held lock before rejecting with LockNotAcquiredError. Default 0: fail fast.