fix: list all servers

Closes coop-cloud/organising#166.
This commit is contained in:
2021-09-16 09:26:12 +02:00
parent 6794236b77
commit f87aad4688
3 changed files with 17 additions and 14 deletions

View File

@ -273,13 +273,18 @@ func SanitiseAppName(name string) string {
// GetAppStatuses queries servers to check the deployment status of given apps
func GetAppStatuses(appFiles AppFiles) (map[string]string, error) {
servers := appFiles.GetServers()
statuses := map[string]string{}
servers, err := GetServers()
if err != nil {
return statuses, err
}
ch := make(chan stack.StackStatus, len(servers))
for _, server := range servers {
go func(s string) { ch <- stack.GetAllDeployedServices(s) }(server)
}
statuses := map[string]string{}
for range servers {
status := <-ch
for _, service := range status.Services {