This commit is contained in:
Adria Navarro 2023-11-29 22:01:25 +01:00
parent f1fafc07f2
commit 73fd1f66c5
1 changed files with 1 additions and 1 deletions

View File

@ -131,7 +131,7 @@ export async function doWithLock<T>(
timeout = setTimeout(async () => { timeout = setTimeout(async () => {
let isExpired = false let isExpired = false
try { try {
lock = await lock!.extend(1000) lock = await lock!.extend(opts.ttl)
} catch (err: any) { } catch (err: any) {
isExpired = err.message.includes("Cannot extend lock on resource") isExpired = err.message.includes("Cannot extend lock on resource")
if (isExpired) { if (isExpired) {