( lockName: string, fn: () => Promise<T>, options?: Partial<DistributedLockOptions> )
| 345 | * @returns Promise<T | null> - Result or null if lock couldn't be acquired |
| 346 | */ |
| 347 | export async function withDistributedLock<T>( |
| 348 | lockName: string, |
| 349 | fn: () => Promise<T>, |
| 350 | options?: Partial<DistributedLockOptions> |
| 351 | ): Promise<T | null> { |
| 352 | return distributedLock.withLock(lockName, fn, options); |
| 353 | } |
no test coverage detected