Skip to main content

Type Alias: WithAdvisoryLockOptions<T>

WithAdvisoryLockOptions<T> = object

Defined in: advisoryLock.ts:3

Type Parameters

Type Parameter
T

Properties

fn

fn: () => Promise<T>

Defined in: advisoryLock.ts:18

What runs while the lock is held.

Returns

Promise<T>


key

key: number

Defined in: advisoryLock.ts:9

A stable, caller-chosen 64-bit integer used as the Postgres advisory lock key. Every process that must be serialized has to use the same one.


lockTimeoutMs?

optional lockTimeoutMs?: number

Defined in: advisoryLock.ts:14

Upper bound in milliseconds on how long to wait to acquire the lock, enforced via Postgres lock_timeout. Omitted, the wait is unbounded.


sequelize

sequelize: Sequelize

Defined in: advisoryLock.ts:4