Skip to content

js-bao-wss-client


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? ​

optional owner?: 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 ​

AcquireOptions.owner


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).

Inherited from ​

AcquireOptions.ttlMs

Documentation validated against js-bao-wss-client 3.4.0 · js-bao 0.11.0 · primitive-admin 1.0.62 · primitive-app 3.1.0 — 2026-09-30