Skip to content

Commit

Permalink
disable dependency graph
Browse files Browse the repository at this point in the history
  • Loading branch information
avneesh-akto committed Apr 18, 2024
1 parent 9363de5 commit 9d8f21e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,17 +204,17 @@ public void syncFunction(List<HttpResponseParams> responseParams, boolean syncIm
apiCatalogSync.computeDelta(aggregator, false, apiCollectionId);
}

for (HttpResponseParams responseParam: filteredResponseParams) {
dependencyAnalyser.analyse(responseParam.getOrig(), responseParam.requestParams.getApiCollectionId());
}
// for (HttpResponseParams responseParam: filteredResponseParams) {
// dependencyAnalyser.analyse(responseParam.getOrig(), responseParam.requestParams.getApiCollectionId());
// }

this.sync_count += filteredResponseParams.size();
int syncThresh = numberOfSyncs < 10 ? 10000 : sync_threshold_count;
if (syncImmediately || this.sync_count >= syncThresh || (Context.now() - this.last_synced) > this.sync_threshold_time || isHarOrPcap) {
numberOfSyncs++;
apiCatalogSync.syncWithDB(syncImmediately, fetchAllSTI);
dependencyAnalyser.dbState = apiCatalogSync.dbState;
dependencyAnalyser.syncWithDb();
// dependencyAnalyser.dbState = apiCatalogSync.dbState;
// dependencyAnalyser.syncWithDb();
syncTrafficMetricsWithDB();
this.last_synced = Context.now();
this.sync_count = 0;
Expand Down
14 changes: 7 additions & 7 deletions apps/dashboard/src/main/java/com/akto/utils/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -490,13 +490,13 @@ public static void pushDataToKafka(int apiCollectionId, String topic, List<Strin
// info.getResourceAnalyser().analyse(responseParams);
// }
// info.getResourceAnalyser().syncWithDb();
try {
DependencyFlow dependencyFlow = new DependencyFlow();
dependencyFlow.run();
dependencyFlow.syncWithDb();
} catch (Exception e) {
loggerMaker.errorAndAddToDb(e,"Exception while running dependency flow", LoggerMaker.LogDb.DASHBOARD);
}
// try {
// DependencyFlow dependencyFlow = new DependencyFlow();
// dependencyFlow.run();
// dependencyFlow.syncWithDb();
// } catch (Exception e) {
// loggerMaker.errorAndAddToDb(e,"Exception while running dependency flow", LoggerMaker.LogDb.DASHBOARD);
// }
}
}

Expand Down

0 comments on commit 9d8f21e

Please sign in to comment.