添加celery启动文档

This commit is contained in:
xie7654
2025-07-03 19:50:08 +08:00
parent 232ed06008
commit 257c3dab0e
6 changed files with 47 additions and 5 deletions

View File

@@ -178,12 +178,12 @@ CELERY_RESULT_SERIALIZER = 'json'
CELERY_ACCEPT_CONTENT = ['json']
CELERY_BEAT_SCHEDULE = {
'every-15-minutes': {
'task': 'system.tasks.add', # 任务路径
'schedule': 900.0, # 每15分钟执行一次
'every-1-minutes': {
'task': 'system.tasks.sync_temu_order', # 任务路径
'schedule': 60, # 每1分钟执行一次
},
}
# celery 配置结束
if os.path.exists(os.path.join(BASE_DIR, 'backend/local_settings.py')):
from backend.local_settings import *

View File

@@ -10,4 +10,5 @@ requests==2.32.3
celery==5.5.3
redis==6.2.0
eventlet==0.40.0
goofish_api==0.0.6
goofish_api==0.0.6
flower==2.0.1