浏览代码

Update docker.py

qiaofeng1227 2 年之前
父节点
当前提交
0300fd1772
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      appmanage/api/utils/docker.py

+ 3 - 1
appmanage/api/utils/docker.py

@@ -14,8 +14,11 @@ def get_process_perc(app_name):
     code = output["code"]
     if int(code) == 0 and output["result"] != "":
         process_now = "starting"
+    
     path = "/data/apps/" + app_name + "/.env"
     http_port = read_env(path, "APP_HTTP_PORT")
+    if http_port == "":
+        port =  read_env(path, "APP_DB_PORT")
     print("curl localhost:" + http_port)
     output = shell_execute.execute_command_output_all("curl localhost:" + http_port)
     code = output["code"]
@@ -23,7 +26,6 @@ def get_process_perc(app_name):
     if int(code) == 0 and output["result"].find("Failed") != -1:
         process_now = "running"
 
-
     return process_now
 
 def check_vm_resource():