From e6277ff1991718b7b8c5abcac3fe73c04e4142ee Mon Sep 17 00:00:00 2001 From: Kaspar Emanuel Date: Sat, 13 Apr 2024 12:47:50 +0100 Subject: [PATCH] processor: Use `catch` in async-lock --- processor/src/queues.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/processor/src/queues.ts b/processor/src/queues.ts index e88b3d56bc..95fa67d047 100644 --- a/processor/src/queues.ts +++ b/processor/src/queues.ts @@ -182,7 +182,7 @@ const lock = new AsyncLock() async function sync(gitDir, checkoutDir) { await lock .acquire(gitDir, async () => { - log.info('Acquired sync lock for ', gitDir) + log.info('Acquired lock for ', gitDir) const registryHash = getRegistryHash(gitDir) @@ -225,7 +225,8 @@ async function sync(gitDir, checkoutDir) { } } }) - .then(() => log.debug('Released sync lock for ', gitDir)) + .then(() => log.debug('Released lock for ', gitDir)) + .catch(e => log.warn('Released lock after for', gitDir, 'after error:', e)) } /**