js-bao-wss-client / BlockingAcquireOptions
Interface: BlockingAcquireOptions
Options for the blocking locks.acquire(): the lease duration plus how long to keep polling for the lock before giving up.
Extends
Properties
owner?
optionalowner?:string
Who is taking this lease — a string you choose, at most 256 characters.
Presenting the owner that ALREADY holds the key, from the same caller and the same kind of caller, re-takes the lease: you get a FRESH handle and a fresh lease, and the handle the previous acquire minted stops working. That is what lets a task run whose handle died with a reset get its own lock back instead of waiting out its own successor.
Name the run (ctx.runId inside a function), or the work a run key coalesces — never a static string, which would let two unrelated callers re-enter each other's hold. Omit it and the lock is strictly non-reentrant, exactly as before.
Inherited from
timeoutMs
timeoutMs:
number
How long to wait for the lock before throwing LockTimeoutError (ms).
ttlMs
ttlMs:
number
Lease duration in ms (required; capped server-side at 24h).