mirror of
https://github.com/Websoft9/websoft9.git
synced 2025-01-24 01:50:19 +08:00
Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
ef17515623
@ -10,7 +10,7 @@ COPY static ./static
|
|||||||
COPY requirements.txt main.py ./
|
COPY requirements.txt main.py ./
|
||||||
RUN apt update
|
RUN apt update
|
||||||
|
|
||||||
# Install supervisords
|
# Install supervisord
|
||||||
RUN apt install -y supervisor
|
RUN apt install -y supervisor
|
||||||
COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||||
COPY config/cmd.sh /cmd.sh
|
COPY config/cmd.sh /cmd.sh
|
||||||
|
@ -239,18 +239,22 @@ def app_exits_in_docker(app_id):
|
|||||||
flag = False
|
flag = False
|
||||||
info = ""
|
info = ""
|
||||||
cmd = "docker compose ls -a | grep \'/" + app_name + "/\'"
|
cmd = "docker compose ls -a | grep \'/" + app_name + "/\'"
|
||||||
output = shell_execute.execute_command_output_all(cmd)
|
try:
|
||||||
if int(output["code"]) == 0:
|
output = shell_execute.execute_command_output_all(cmd)
|
||||||
info = output["result"]
|
if int(output["code"]) == 0:
|
||||||
app_path = info.split()[-1].rsplit('/', 1)[0]
|
info = output["result"]
|
||||||
is_official = check_if_official_app(app_path + '/variables.json')
|
app_path = info.split()[-1].rsplit('/', 1)[0]
|
||||||
if is_official:
|
is_official = check_if_official_app(app_path + '/variables.json')
|
||||||
name = docker.read_var(app_path + '/variables.json', 'name')
|
if is_official:
|
||||||
if name == app_name:
|
name = docker.read_var(app_path + '/variables.json', 'name')
|
||||||
|
if name == app_name:
|
||||||
|
flag = True
|
||||||
|
elif app_name == customer_name:
|
||||||
flag = True
|
flag = True
|
||||||
elif app_name == customer_name:
|
myLogger.info_logger("APP in docker")
|
||||||
flag = True
|
except CommandException as ce:
|
||||||
myLogger.info_logger("APP info: " + info)
|
myLogger.info_logger("APP not in docker")
|
||||||
|
|
||||||
return info, flag
|
return info, flag
|
||||||
|
|
||||||
def split_app_id(app_id):
|
def split_app_id(app_id):
|
||||||
@ -362,12 +366,15 @@ def check_app_rq(app_id):
|
|||||||
myLogger.info_logger(run_job_ids)
|
myLogger.info_logger(run_job_ids)
|
||||||
myLogger.info_logger(failed_job_ids)
|
myLogger.info_logger(failed_job_ids)
|
||||||
if queue_job_ids and app_id in queue_job_ids:
|
if queue_job_ids and app_id in queue_job_ids:
|
||||||
|
myLogger.info_logger("App in RQ")
|
||||||
return True
|
return True
|
||||||
if failed_job_ids and app_id in failed_job_ids:
|
if failed_job_ids and app_id in failed_job_ids:
|
||||||
|
myLogger.info_logger("App in RQ")
|
||||||
return True
|
return True
|
||||||
if run_job_ids and app_id in run_job_ids:
|
if run_job_ids and app_id in run_job_ids:
|
||||||
return True
|
myLogger.info_logger("App in RQ")
|
||||||
|
return True
|
||||||
|
myLogger.info_logger("App not in RQ")
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def get_apps_from_queue():
|
def get_apps_from_queue():
|
||||||
|
Loading…
Reference in New Issue
Block a user