Skip to content

Commit

Permalink
processor: fix issue with continuing on error during sync (#644)
Browse files Browse the repository at this point in the history
  • Loading branch information
kasbah authored Apr 13, 2024
1 parent aa11e26 commit 0a92ce1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions processor/src/queues.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,12 @@ export async function addProjectToQueues({
}: AddProjectToQueueData) {
const inputDir = path.join(DATA_DIR, 'checkout', ownerName, repoName)

await sync(gitDir, inputDir)
try {
await sync(gitDir, inputDir)
} catch (e) {
log.warn('Released lock for', gitDir, 'after error:', e)
return
}

const hash = await getGitHash(inputDir)
const outputDir = path.join(
Expand Down Expand Up @@ -226,7 +231,6 @@ async function sync(gitDir, checkoutDir) {
}
})
.then(() => log.debug('Released lock for ', gitDir))
.catch(e => log.warn('Released lock for', gitDir, 'after error:', e))
}

/**
Expand Down

0 comments on commit 0a92ce1

Please sign in to comment.