From 4d5a699ccfab31738489b011c4f5458a3d979960 Mon Sep 17 00:00:00 2001 From: qiaofeng1227 <76487013@qq.com> Date: Fri, 10 Mar 2023 17:45:38 +0800 Subject: [PATCH] Update docker.py --- appmanage/api/utils/docker.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/appmanage/api/utils/docker.py b/appmanage/api/utils/docker.py index ec502516..f06704c2 100644 --- a/appmanage/api/utils/docker.py +++ b/appmanage/api/utils/docker.py @@ -15,11 +15,11 @@ def get_process_perc(app_name): if int(code) == 0 and output["result"] != "": process_now = "starting" - output = shell_execute.execute_command_output_all("sudo docker compose ls |grep " + app_name) + output = shell_execute.execute_command_output_all("docker inspect " + app_name + "|grep error") code = output["code"] - if int(code) == 0 and output["result"] != "": - process_now = "running" - + if int(code) == 0 and output["result"] == "": + process_now = "Initializing" + return process_now def check_vm_resource():