Store variant analyses in manager
This will store all variant analysis that are run in the manager. Right now, it only stores the variant analyses in memory. In the future, these will be loaded from the query history and can be restored after a restart.
This commit is contained in:
@@ -23,6 +23,7 @@ import { CodeQLCliServer } from '../cli';
|
||||
export class VariantAnalysisManager extends DisposableObject implements VariantAnalysisViewManager<VariantAnalysisView> {
|
||||
private readonly variantAnalysisMonitor: VariantAnalysisMonitor;
|
||||
private readonly variantAnalysisResultsManager: VariantAnalysisResultsManager;
|
||||
private readonly variantAnalyses = new Map<number, VariantAnalysis>();
|
||||
private readonly views = new Map<number, VariantAnalysisView>();
|
||||
|
||||
constructor(
|
||||
@@ -70,6 +71,8 @@ export class VariantAnalysisManager extends DisposableObject implements VariantA
|
||||
return;
|
||||
}
|
||||
|
||||
this.variantAnalyses.set(variantAnalysis.id, variantAnalysis);
|
||||
|
||||
await this.getView(variantAnalysis.id)?.updateView(variantAnalysis);
|
||||
}
|
||||
|
||||
|
||||
@@ -41,6 +41,8 @@ export class VariantAnalysisMonitor extends DisposableObject {
|
||||
let attemptCount = 0;
|
||||
const scannedReposDownloaded: number[] = [];
|
||||
|
||||
this._onVariantAnalysisChange.fire(variantAnalysis);
|
||||
|
||||
while (attemptCount <= VariantAnalysisMonitor.maxAttemptCount) {
|
||||
await this.sleep(VariantAnalysisMonitor.sleepTime);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user