mirror of
https://github.com/Websoft9/websoft9.git
synced 2024-11-22 23:50:31 +00:00
process
This commit is contained in:
parent
b2610f24b1
commit
0872ac46a1
2 changed files with 4 additions and 3 deletions
|
@ -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:
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue