[ Agent ] [ APP ] - refresh app procedure
This commit is contained in:
@@ -10,14 +10,14 @@ func CheckPodStatus(specific string, supreme string) bool {
|
||||
log.Error("kubectl命令不存在,无法查看Pod状态,请查看!")
|
||||
}
|
||||
|
||||
executor, err := SingleLineCommandExecutor([]string{
|
||||
ok, resultLog := AllCommandExecutor([]string{
|
||||
"kubectl", "-n", supreme, "get", "pod", specific, "-o", "jsonpath='{.status.phase}'",
|
||||
})
|
||||
if err != nil {
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
|
||||
for _, resultLine := range executor {
|
||||
for _, resultLine := range resultLog {
|
||||
if strings.HasPrefix(resultLine, "Running") {
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user