Skip to content

Commit a84271b

Browse files
committed
Improve further azure apps
1 parent 03a9d6d commit a84271b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

internal/azure/azure_apps.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,15 @@ func (staticCreds *AzureStaticCredentials) GetAzureAppsData(logger *logger.Logge
7575
// run concurrently
7676
mutex := new(sync.Mutex)
7777
appsData := make([]*AppData, 0, len(appsInfo))
78-
g := new(errgroup.Group)
78+
g, _ := errgroup.WithContext(context.Background())
7979

8080
for _, app := range appsInfo {
81-
g.Go(func() error {
82-
if strings.ToLower(*app.Properties.State) != "running" {
83-
logger.Debug("app %s is not running, skipping from report", *app.Name)
84-
return nil
85-
}
81+
if strings.ToLower(*app.Properties.State) != "running" {
82+
logger.Debug("app %s is not running, skipping from report", *app.Name)
83+
continue
84+
}
8685

86+
g.Go(func() error {
8787
data, err := azureClient.NewAppData(app, logger)
8888
if err != nil {
8989
return err

0 commit comments

Comments
 (0)