mirror of
https://github.com/Websoft9/websoft9.git
synced 2025-01-23 17:40:35 +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 ./
|
||||
RUN apt update
|
||||
|
||||
# Install supervisords
|
||||
# Install supervisord
|
||||
RUN apt install -y supervisor
|
||||
COPY config/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||
COPY config/cmd.sh /cmd.sh
|
||||
|
@ -239,18 +239,22 @@ def app_exits_in_docker(app_id):
|
||||
flag = False
|
||||
info = ""
|
||||
cmd = "docker compose ls -a | grep \'/" + app_name + "/\'"
|
||||
output = shell_execute.execute_command_output_all(cmd)
|
||||
if int(output["code"]) == 0:
|
||||
info = output["result"]
|
||||
app_path = info.split()[-1].rsplit('/', 1)[0]
|
||||
is_official = check_if_official_app(app_path + '/variables.json')
|
||||
if is_official:
|
||||
name = docker.read_var(app_path + '/variables.json', 'name')
|
||||
if name == app_name:
|
||||
try:
|
||||
output = shell_execute.execute_command_output_all(cmd)
|
||||
if int(output["code"]) == 0:
|
||||
info = output["result"]
|
||||
app_path = info.split()[-1].rsplit('/', 1)[0]
|
||||
is_official = check_if_official_app(app_path + '/variables.json')
|
||||
if is_official:
|
||||
name = docker.read_var(app_path + '/variables.json', 'name')
|
||||
if name == app_name:
|
||||
flag = True
|
||||
elif app_name == customer_name:
|
||||
flag = True
|
||||
elif app_name == customer_name:
|
||||
flag = True
|
||||
myLogger.info_logger("APP info: " + info)
|
||||
myLogger.info_logger("APP in docker")
|
||||
except CommandException as ce:
|
||||
myLogger.info_logger("APP not in docker")
|
||||
|
||||
return info, flag
|
||||
|
||||
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(failed_job_ids)
|
||||
if queue_job_ids and app_id in queue_job_ids:
|
||||
myLogger.info_logger("App in RQ")
|
||||
return True
|
||||
if failed_job_ids and app_id in failed_job_ids:
|
||||
myLogger.info_logger("App in RQ")
|
||||
return True
|
||||
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
|
||||
|
||||
def get_apps_from_queue():
|
||||
|
Loading…
Reference in New Issue
Block a user