Skip to content

Commit

Permalink
processor: Use catch in async-lock
Browse files Browse the repository at this point in the history
  • Loading branch information
kasbah committed Apr 13, 2024
1 parent 43a362f commit 9cb7543
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions processor/src/queues.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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.warning('Released lock after for', gitDir, 'after error:', e))
}

/**
Expand Down

0 comments on commit 9cb7543

Please sign in to comment.