Skip to content

Commit

Permalink
feat: relax the bach error check to fail after 2 batches
Browse files Browse the repository at this point in the history
  • Loading branch information
lili2311 committed Apr 21, 2023
1 parent 21b7a64 commit 7f403bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/api/import/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ export async function importTargets(
{ errorMessage: error.message },
loggingPath,
);
if (failed % concurrentImports === 0) {
if (failed % (concurrentImports * 2) === 0) {
console.error(
`Every import in this batch failed, stopping as this is unexpected! Please check if everything is configured ok and review the logs located at ${loggingPath}/*. If everything looks OK re-start the import, previously imported targets will be skipped.`,
`Every import in the last few batches failed, stopping as this is unexpected! Please check if everything is configured ok and review the logs located at ${loggingPath}/*. If everything looks OK re-start the import, previously imported targets will be skipped.`,
);
// die immediately
process.exit(1);
Expand Down

0 comments on commit 7f403bc

Please sign in to comment.