forked from coop-cloud/abra
fix: use appFiles to determine server list
This commit is contained in:
parent
bd1bf3b0d6
commit
95a9013658
|
@ -278,14 +278,20 @@ func SanitiseAppName(name string) string {
|
||||||
func GetAppStatuses(appFiles AppFiles) (map[string]string, error) {
|
func GetAppStatuses(appFiles AppFiles) (map[string]string, error) {
|
||||||
statuses := map[string]string{}
|
statuses := map[string]string{}
|
||||||
|
|
||||||
servers, err := GetServers()
|
var unique []string
|
||||||
if err != nil {
|
servers := make(map[string]struct{})
|
||||||
return statuses, err
|
for _, appFile := range appFiles {
|
||||||
|
if _, ok := servers[appFile.Server]; !ok {
|
||||||
|
servers[appFile.Server] = struct{}{}
|
||||||
|
unique = append(unique, appFile.Server)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ch := make(chan stack.StackStatus, len(servers))
|
ch := make(chan stack.StackStatus, len(servers))
|
||||||
for _, server := range servers {
|
for server := range servers {
|
||||||
go func(s string) { ch <- stack.GetAllDeployedServices(s) }(server)
|
go func(s string) {
|
||||||
|
ch <- stack.GetAllDeployedServices(s)
|
||||||
|
}(server)
|
||||||
}
|
}
|
||||||
|
|
||||||
for range servers {
|
for range servers {
|
||||||
|
|
Loading…
Reference in New Issue