Skip to content

Commit

Permalink
Merge pull request #12 from snyk-tech-services/feat/more-logging
Browse files Browse the repository at this point in the history
feat: log the batches we are processing
  • Loading branch information
lili2311 authored May 27, 2020
2 parents 63a27be + 723dffc commit e339684
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/scripts/import-projects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export async function ImportProjects(
} catch (e) {
throw new Error(`Failed to parse targets from ${fileName}`);
}
debug(`Loaded ${targets.length} targets to import`);
debug(`Loaded ${targets.length} targets to import ${Date.now()}`);
const concurrentTargets = getConcurrentImportsNumber();
const projects: Project[] = [];
//TODO: validation?
Expand All @@ -65,6 +65,10 @@ export async function ImportProjects(
targetIndex,
targetIndex + concurrentTargets,
);
debug(
`Importing batch ${targetIndex} - ${targetIndex +
concurrentTargets} out of ${filteredTargets.length}`,
);
const pollingUrlsAndContext = await importTargets(batch, loggingPath);
projects.push(...(await pollImportUrls(pollingUrlsAndContext)));
}
Expand Down

0 comments on commit e339684

Please sign in to comment.