Add the --threads config option to finalize db (#281)
This flag is already being used for `runQueries`, so let's use it for finalize as well.
This commit is contained in:
parent
a6c99e6b5b
commit
bc1ee1620f
6 changed files with 14 additions and 10 deletions
6
lib/analyze.js
generated
6
lib/analyze.js
generated
|
|
@ -65,12 +65,12 @@ async function createdDBForScannedLanguages(config, logger) {
|
|||
}
|
||||
}
|
||||
}
|
||||
async function finalizeDatabaseCreation(config, logger) {
|
||||
async function finalizeDatabaseCreation(config, threadsFlag, logger) {
|
||||
await createdDBForScannedLanguages(config, logger);
|
||||
const codeql = codeql_1.getCodeQL(config.codeQLCmd);
|
||||
for (const language of config.languages) {
|
||||
logger.startGroup(`Finalizing ${language}`);
|
||||
await codeql.finalizeDatabase(util.getCodeQLDatabasePath(config.tempDir, language));
|
||||
await codeql.finalizeDatabase(util.getCodeQLDatabasePath(config.tempDir, language), threadsFlag);
|
||||
logger.endGroup();
|
||||
}
|
||||
}
|
||||
|
|
@ -122,7 +122,7 @@ async function runAnalyze(repositoryNwo, commitOid, ref, analysisKey, analysisNa
|
|||
delete process.env[sharedEnv.ODASA_TRACER_CONFIGURATION];
|
||||
fs.mkdirSync(outputDir, { recursive: true });
|
||||
logger.info("Finalizing database creation");
|
||||
await finalizeDatabaseCreation(config, logger);
|
||||
await finalizeDatabaseCreation(config, threadsFlag, logger);
|
||||
logger.info("Analyzing database");
|
||||
const queriesStats = await runQueries(outputDir, memoryFlag, addSnippetsFlag, threadsFlag, config, logger);
|
||||
if (!doUpload) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue