refactor: parallelize report commands

This will make reports a bit faster to run, and is safe to do as reports should not change app state.
This commit is contained in:
Jose Diaz-Gonzalez
2020-12-29 23:56:10 -05:00
parent 44461e21df
commit 28c9f42a25
9 changed files with 237 additions and 120 deletions

View File

@@ -206,21 +206,3 @@ func ClearNetworkConfig(appName string) bool {
}
return success
}
// ReportSingleApp is an internal function that displays the app report for one or more apps
func ReportSingleApp(appName, infoFlag string) error {
if err := common.VerifyAppName(appName); err != nil {
return err
}
infoFlags := map[string]string{
"--network-bind-all-interfaces": common.PropertyGet("network", appName, "bind-all-interfaces"),
"--network-attach-post-create": common.PropertyGet("network", appName, "attach-post-create"),
"--network-attach-post-deploy": common.PropertyGet("network", appName, "attach-post-deploy"),
"--network-web-listeners": strings.Join(GetListeners(appName, "web"), " "),
}
trimPrefix := false
uppercaseFirstCharacter := true
return common.ReportSingleApp("network", appName, infoFlag, infoFlags, trimPrefix, uppercaseFirstCharacter)
}