1
0
Fork 0
mirror of synced 2024-10-05 20:44:47 +13:00
This commit is contained in:
Adria Navarro 2023-11-29 22:01:25 +01:00
parent f1fafc07f2
commit 73fd1f66c5

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) {