mirror of
https://github.com/Websoft9/websoft9.git
synced 2024-11-22 07:30:24 +00:00
erpnext status show exited bug
This commit is contained in:
parent
38b10bd6be
commit
f9a295547c
2 changed files with 10 additions and 10 deletions
|
@ -10,7 +10,7 @@ COPY static ./static
|
|||
COPY requirements.txt main.py ./
|
||||
RUN apt update
|
||||
|
||||
# Install supervisord
|
||||
# Install supervisords
|
||||
RUN apt install -y supervisor
|
||||
COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||
COPY config/cmd.sh /cmd.sh
|
||||
|
|
|
@ -326,17 +326,17 @@ def get_apps_from_compose():
|
|||
default_domain = ""
|
||||
if customer_name in ['w9appmanage', 'w9nginxproxymanager','w9redis','w9portainer'] and app_path == '/data/apps/stackhub/docker/' + customer_name:
|
||||
continue
|
||||
|
||||
|
||||
status_show = app_info["Status"]
|
||||
status = app_info["Status"].split("(")[0]
|
||||
if status == "running" or status == "exited" or status == "restarting":
|
||||
myLogger.info_logger("ok")
|
||||
if status == "exited":
|
||||
|
||||
cmd = "docker ps -a -f name=" + customer_name + " --format {{.Names}}#{{.Status}}|grep Exited"
|
||||
result = shell_execute.execute_command_output_all(cmd)["result"].rstrip('\n')
|
||||
container = result.split("#Exited")[0]
|
||||
if container != customer_name:
|
||||
status = "running"
|
||||
if "exited" in status_show and "running" in status_show:
|
||||
if status == "exited":
|
||||
cmd = "docker ps -a -f name=" + customer_name + " --format {{.Names}}#{{.Status}}|grep Exited"
|
||||
result = shell_execute.execute_command_output_all(cmd)["result"].rstrip('\n')
|
||||
container = result.split("#Exited")[0]
|
||||
if container != customer_name:
|
||||
status = "running"
|
||||
elif status == "created":
|
||||
status = "failed"
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue