feat: implement all of ps:report

This commit is contained in:
Jose Diaz-Gonzalez
2020-11-17 03:28:26 -05:00
parent bb9f764b9f
commit e8d0965a33
2 changed files with 39 additions and 0 deletions

View File

@@ -152,6 +152,13 @@ func getRestartPolicy(appName string) (string, error) {
return "", nil
}
func getProcessCount(appName string) (int, error) {
scheduler := common.GetAppScheduler(appName)
b, _ := common.PlugnTriggerOutput("scheduler-app-status", []string{scheduler, appName}...)
count := strings.Split(strings.TrimSpace(string(b[:])), " ")[0]
return strconv.Atoi(count)
}
func getRunningState(appName string) string {
scheduler := common.GetAppScheduler(appName)
b, _ := common.PlugnTriggerOutput("scheduler-app-status", []string{scheduler, appName}...)