mirror of
https://github.com/Websoft9/websoft9.git
synced 2024-11-25 17:10:27 +00:00
cron
This commit is contained in:
parent
67c911c70b
commit
44f76834c5
2 changed files with 4 additions and 2 deletions
|
@ -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
|
||||||
|
|
|
@ -22,7 +22,9 @@ from rq import Queue, Worker, Connection
|
||||||
from rq.registry import StartedJobRegistry, FinishedJobRegistry, DeferredJobRegistry, FailedJobRegistry, ScheduledJobRegistry, CanceledJobRegistry
|
from rq.registry import StartedJobRegistry, FinishedJobRegistry, DeferredJobRegistry, FailedJobRegistry, ScheduledJobRegistry, CanceledJobRegistry
|
||||||
from api.exception.command_exception import CommandException
|
from api.exception.command_exception import CommandException
|
||||||
from apscheduler.schedulers.background import BackgroundScheduler
|
from apscheduler.schedulers.background import BackgroundScheduler
|
||||||
from apscheduler.triggers.interval import IntervalTrigger,CronTrigger
|
from apscheduler.triggers.date import DateTrigger
|
||||||
|
from apscheduler.triggers.cron import CronTrigger
|
||||||
|
from apscheduler.triggers.interval import IntervalTrigger
|
||||||
|
|
||||||
# 指定 Redis 容器的主机名和端口
|
# 指定 Redis 容器的主机名和端口
|
||||||
redis_conn = Redis(host='websoft9-redis', port=6379)
|
redis_conn = Redis(host='websoft9-redis', port=6379)
|
||||||
|
|
Loading…
Reference in a new issue