This commit is contained in:
qiaofeng1227 2023-03-15 02:26:52 +00:00
parent b2610f24b1
commit 0872ac46a1
2 changed files with 4 additions and 3 deletions

View file

@ -143,8 +143,9 @@ def get_admin_url(app_name, url):
def install_app_process(app_name):
real_name = docker.read_var(app_name, 'name')
if docker.check_app_directory(app_name):
percentage = docker.get_process_perc(app_name)
percentage = docker.get_process_perc(app_name, real_name)
ret = Response(code=const.RETURN_SUCCESS, message=percentage)
ret = ret.dict()
else:

View file

@ -7,10 +7,10 @@ from dotenv import load_dotenv, find_dotenv
import dotenv
from pathlib import Path
def get_process_perc(app_name):
def get_process_perc(app_name, real_name):
process_now = "pulling"
output = shell_execute.execute_command_output_all("sudo docker image list |grep " + app_name)
output = shell_execute.execute_command_output_all("sudo docker image list |grep " + real_name)
code = output["code"]
if int(code) == 0 and output["result"] != "":
process_now = "starting"