feat: add support for process state in ps:report output

This commit is contained in:
Jose Diaz-Gonzalez
2020-11-18 02:18:25 -05:00
parent 36dc98452d
commit f13ee16ab8
2 changed files with 89 additions and 64 deletions

View File

@@ -68,7 +68,6 @@ func ReportSingleApp(appName, infoFlag string) error {
return err
}
policy, _ := getRestartPolicy(appName)
if policy == "" {
policy = DefaultProperties["restart-policy"]
@@ -100,12 +99,20 @@ func ReportSingleApp(appName, infoFlag string) error {
}
infoFlags := map[string]string{
"--processes": strconv.Itoa(count),
"--running": runningState,
"--restore": restore,
"--deployed": deployed,
"--ps-can-scale": canScale,
"--deployed": deployed,
"--processes": strconv.Itoa(count),
"--ps-can-scale": canScale,
"--ps-restart-policy": policy,
"--restore": restore,
"--running": runningState,
}
scheduler := common.GetAppScheduler(appName)
if scheduler == "docker-local" {
processStatus := getProcessStatus(appName)
for process, value := range processStatus {
infoFlags[fmt.Sprintf("--status-%s", process)] = value
}
}
trimPrefix := false