@ndustrial/node-distributed-lock
Version:
Enables distributed locking for sequelize applications
13 lines (12 loc) • 389 B
TypeScript
export = Mutex;
declare class Mutex {
constructor(options: any);
lockTableName: any;
lockTTLSeconds: any;
queryInterface: any;
lockInterface: any;
initializeLockTable(): Promise<void>;
obtainLock(lockName: any, nodeId: any): Promise<void>;
releaseLock(lockName: any, nodeId: any): Promise<void>;
withLock(callback: any, wait?: boolean): Promise<any>;
}