Async
This commit is contained in:
parent
3073397800
commit
5a7dbb0076
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue