Fix
This commit is contained in:
parent
f1fafc07f2
commit
73fd1f66c5
|
@ -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) {
|
||||||
|
|
Loading…
Reference in New Issue