Skip to content

Commit

Permalink
processor: Use catch in async-lock (#642)
Browse files Browse the repository at this point in the history
  • Loading branch information
kasbah authored Apr 13, 2024
1 parent a3e0278 commit d7baf10
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.warn('Released lock for', gitDir, 'after error:', e))
}

/**
Expand Down

0 comments on commit d7baf10

Please sign in to comment.