LogoRobo.js
Framework

CatalogLockManager

Class: CatalogLockManager

Lock manager for catalog operations.

Provides per-model catalog locking to serialize catalog mutations.

Constructors

new CatalogLockManager()

new CatalogLockManager(): CatalogLockManager

Returns

CatalogLockManager

Methods

withCatalogLock()

withCatalogLock<T>(modelKey, fn): Promise<T>

Execute a function while holding the catalog lock for a model.

Type Parameters

Type Parameter
T

Parameters

ParameterTypeDescription
modelKeystringModel key
fn() => Promise<T>Function to execute

Returns

Promise<T>

Result of the function

On this page