Update docker.py

This commit is contained in:
qiaofeng1227 2023-03-10 09:25:30 +08:00 committed by GitHub
parent 0b2674f98f
commit 4ee77f39d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -16,8 +16,10 @@ def get_process_perc(app_name):
process_now = "starting"
path = "/data/apps/" + app_name + "/.env"
http_port = read_env(path, "APP_HTTP_PORT")
print("curl localhost:" + http_port)
output = shell_execute.execute_command_output_all("curl localhost:" + http_port)
code = output["code"]
print(output["result"])
if int(code) == 0 and output["result"].find("Failed") != -1:
process_now = "running"