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
07f6982c05
@ -10,7 +10,7 @@ COPY static ./static
|
|||||||
COPY requirements.txt main.py ./
|
COPY requirements.txt main.py ./
|
||||||
RUN apt update
|
RUN apt update
|
||||||
|
|
||||||
# Install supervisord
|
# Install supervisords
|
||||||
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
|
||||||
|
@ -138,8 +138,8 @@ def restart_app(app_id):
|
|||||||
|
|
||||||
def delete_app_failedjob(job_id):
|
def delete_app_failedjob(job_id):
|
||||||
myLogger.info_logger("delete_app_failedjob")
|
myLogger.info_logger("delete_app_failedjob")
|
||||||
fail_job = q.fetch_job(job_id)
|
failed = FailedJobRegistry(queue=q)
|
||||||
fail_job.delete()
|
failed.remove(job_id, delete_job=True)
|
||||||
|
|
||||||
def uninstall_app(app_id):
|
def uninstall_app(app_id):
|
||||||
code, message = docker.check_app_id(app_id)
|
code, message = docker.check_app_id(app_id)
|
||||||
@ -407,25 +407,23 @@ def get_apps_from_queue():
|
|||||||
|
|
||||||
installing_list = []
|
installing_list = []
|
||||||
for job_id in run_job_ids:
|
for job_id in run_job_ids:
|
||||||
app = get_installing_app(job_id, 'installing', "", "", "")
|
app = get_rq_app(job_id, 'installing', "", "", "")
|
||||||
installing_list.append(app)
|
installing_list.append(app)
|
||||||
for job in q.jobs:
|
for job in q.jobs:
|
||||||
app = get_installing_app(job.id, 'installing', "", "", "")
|
app = get_rq_app(job.id, 'installing', "", "", "")
|
||||||
installing_list.append(app)
|
installing_list.append(app)
|
||||||
for job_id in failed_jobs:
|
for job_id in failed_jobs:
|
||||||
job = q.fetch_job(job_id)
|
job = q.fetch_job(job_id)
|
||||||
app = get_installing_app(job_id, 'failed', "", "", "")
|
app = get_rq_app(job_id, 'failed', "", "", "")
|
||||||
installing_list.append(app)
|
installing_list.append(app)
|
||||||
|
|
||||||
return installing_list
|
return installing_list
|
||||||
|
|
||||||
def get_installing_app(id, status, code, message, detail):
|
def get_rq_app(id, status, code, message, detail):
|
||||||
app_name = id.split('_')[0]
|
app_name = id.split('_')[0]
|
||||||
customer_name = id.split('_')[1]
|
customer_name = id.split('_')[1]
|
||||||
|
# 当app还在RQ时,可能文件夹还没创建,无法获取trade_mark
|
||||||
trade_mark = ""
|
trade_mark = ""
|
||||||
if status == "installing":
|
|
||||||
var_path = "/data/apps/" + customer_name + "/variables.json"
|
|
||||||
trade_mark = docker.read_var(var_path, 'trademark')
|
|
||||||
|
|
||||||
image_url = get_Image_url(app_name)
|
image_url = get_Image_url(app_name)
|
||||||
running_info = RunningInfo(port=0, compose_file="", url="", admin_url="",
|
running_info = RunningInfo(port=0, compose_file="", url="", admin_url="",
|
||||||
|
Loading…
Reference in New Issue
Block a user