1
0
Fork 0
mirror of synced 2024-09-08 05:31:47 +12:00

Fix usage of custom locks

This commit is contained in:
Rory Powell 2023-05-05 14:42:21 +01:00
parent cde5259e44
commit 1ba5eda149

View file

@ -85,7 +85,7 @@ export const doWithLock = async <T>(
opts: LockOptions, opts: LockOptions,
task: () => Promise<T> task: () => Promise<T>
): Promise<RedlockExecution<T>> => { ): Promise<RedlockExecution<T>> => {
const redlock = await getClient(opts.type) const redlock = await getClient(opts.type, opts.customOptions)
let lock let lock
try { try {
// determine lock name // determine lock name