Remove wait group for onboarding complete code (#19580)

* remove wait group for onboarding complete code
Этот коммит содержится в:
Nathaniel Allred
2022-02-17 10:05:37 -06:00
коммит произвёл GitHub
родитель 59a34bfc53
Коммит a3c1507563
2 изменённых файлов: 23 добавлений и 14 удалений

Просмотреть файл

@@ -5,7 +5,6 @@ package app
import (
"net/http"
"sync"
"github.com/pkg/errors"
@@ -23,12 +22,9 @@ func (a *App) CompleteOnboarding(c *request.Context, request *model.CompleteOnbo
pluginContext := pluginContext(c)
var wg sync.WaitGroup
for _, pluginID := range request.InstallPlugins {
wg.Add(1)
go func(id string) {
defer wg.Done()
installRequest := &model.InstallMarketplacePluginRequest{
Id: id,
}
@@ -68,8 +64,6 @@ func (a *App) CompleteOnboarding(c *request.Context, request *model.CompleteOnbo
return model.NewAppError("setFirstAdminCompleteSetup", "api.error_set_first_admin_complete_setup", nil, err.Error(), http.StatusInternalServerError)
}
wg.Wait()
return nil
}