Skip to content

Commit

Permalink
Merge pull request #481 from Lingghh/main
Browse files Browse the repository at this point in the history
🎨完善Docker构建
  • Loading branch information
RussGan committed Jul 28, 2022
2 parents 9665e28 + f03ea2b commit 8cc6334
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ ENV MYSQL_PASSWORD=TCA!@#2021

ARG EXTRA_TOOLS="gnupg curl wget jq net-tools procps python3-dev default-libmysqlclient-dev locales inotify-tools gcc subversion git telnet iputils-ping vim openssh-client redis nginx unzip"

# RUN mv /etc/apt/sources.list /etc/apt/sources.list.bak && \
# && echo 'deb http://mirrors.tencent.com/debian/ bullseye main non-free contrib' > /etc/apt/sources.list \
# && echo 'deb http://mirrors.tencent.com/debian/ bullseye-updates main non-free contrib' >> /etc/apt/sources.list \
# && echo 'deb http://mirrors.tencent.com/debian-security bullseye-security main non-free contrib' >> /etc/apt/sources.list \
# && mkdir -p ~/.pip/ \
# && echo "[global]\nindex-url = https://mirrors.cloud.tencent.com/pypi/simple\n[install]\ntrusted-host=mirrors.cloud.tencent.com" > ~/.pip/pip.conf

RUN set -ex && cd / \
&& apt-get update \
&& apt-get install -y --no-install-recommends $EXTRA_TOOLS \
Expand All @@ -19,10 +26,6 @@ RUN set -ex && cd / \
&& locale-gen \
&& ln -sf /usr/share/zoneinfo/Asia/Hong_Kong /etc/localtime

# Add pypi tencent mirror
# RUN mkdir -p ~/.pip/ \
# && echo "[global]\nindex-url = https://mirrors.cloud.tencent.com/pypi/simple\n[install]\ntrusted-host=mirrors.cloud.tencent.com" > ~/.pip/pip.conf

RUN pip install -U setuptools pip \
&& pip install gunicorn==20.1.0 celery==5.2.3 supervisor==4.2.4

Expand Down
2 changes: 1 addition & 1 deletion server/projects/main/apps/job/tasks/jobcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def monitor_closing_job():
logger.info("[PeriodicTasks]开始查询入库中的任务,当前入库中的任务数: %s" % closing_job.count())
for job in closing_job:
job = Job.objects.get(id=job.id)
if job.save_time() < settings.CLOSING_JOB_TIMEOUT:
if job.save_time < settings.CLOSING_JOB_TIMEOUT:
continue
logger.info("[PeriodicTasks][Project: %s][Job: %s] job closing timeout" % (
job.project_id, job.id))
Expand Down

0 comments on commit 8cc6334

Please sign in to comment.