diff --git a/packages/backend-core/src/redis/redlockImpl.ts b/packages/backend-core/src/redis/redlockImpl.ts index 048d17d080..9a6b200c81 100644 --- a/packages/backend-core/src/redis/redlockImpl.ts +++ b/packages/backend-core/src/redis/redlockImpl.ts @@ -118,8 +118,8 @@ export async function doWithLock( if (!opts.ttl) { // No TTL is provided, so we keep extending the lock while the task is running - interval = setInterval(() => { - lock?.extend(ttl / 2) + interval = setInterval(async () => { + await lock?.extend(ttl / 2) }, ttl / 2) }