forked from toolshed/abra
@ -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 {
|
||||
|
Reference in New Issue
Block a user