This commit is contained in:
Adria Navarro 2023-11-29 18:20:54 +01:00
parent 3073397800
commit 5a7dbb0076
1 changed files with 2 additions and 2 deletions

View File

@ -118,8 +118,8 @@ export async function doWithLock<T>(
if (!opts.ttl) { if (!opts.ttl) {
// No TTL is provided, so we keep extending the lock while the task is running // No TTL is provided, so we keep extending the lock while the task is running
interval = setInterval(() => { interval = setInterval(async () => {
lock?.extend(ttl / 2) await lock?.extend(ttl / 2)
}, ttl / 2) }, ttl / 2)
} }