diff --git a/packages/backend-core/src/redis/redlockImpl.ts b/packages/backend-core/src/redis/redlockImpl.ts index 136d7f5d33..d3a74bb4db 100644 --- a/packages/backend-core/src/redis/redlockImpl.ts +++ b/packages/backend-core/src/redis/redlockImpl.ts @@ -63,7 +63,10 @@ export const newRedlock = async (opts: Options = {}) => { return new Redlock([client], options) } -export const doWithLock = async (opts: LockOptions, task: any) => { +export const doWithLock = async ( + opts: LockOptions, + task: () => Promise +) => { const redlock = await getClient(opts.type) let lock try {