Skip to content

Commit

Permalink
fix: update kinds slice in graphstats for effectively saving kind sta…
Browse files Browse the repository at this point in the history
…t counts (#551)
  • Loading branch information
urangel authored Apr 12, 2024
1 parent d9b6be4 commit 66084cf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cmd/api/src/analysis/azure/queries.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ func GraphStats(ctx context.Context, db graph.Database) (model.AzureDataQualityS
stats = model.AzureDataQualityStats{}
runID string

kinds = graph.Kinds{azure.User, azure.Group, azure.App, azure.ServicePrincipal, azure.Device,
azure.ManagementGroup, azure.Subscription, azure.ResourceGroup, azure.VM, azure.KeyVault}
kinds = azure.NodeKinds()
)

if newUUID, err := uuid.NewV4(); err != nil {
Expand Down Expand Up @@ -154,6 +153,8 @@ func GraphStats(ctx context.Context, db graph.Database) (model.AzureDataQualityS
case azure.WebApp:
stat.WebApps = int(count)
aggregation.WebApps += int(count)
case azure.Tenant:
// Do nothing. Only AzureDataQualityAggregation stats have tenant stats and the tenants stats are handled in the outer tenant loop
}
mutex.Unlock()
return nil
Expand Down

0 comments on commit 66084cf

Please sign in to comment.