调接口的任务改为每天上午9点执行一次
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
Celery应用配置
|
||||
"""
|
||||
from celery import Celery
|
||||
from celery.schedules import crontab
|
||||
from app.config import settings
|
||||
from app.logger import get_celery_logger
|
||||
|
||||
@@ -36,7 +37,7 @@ celery_app.conf.update(
|
||||
},
|
||||
'daily-morning-task': {
|
||||
'task': 'call_api',
|
||||
'schedule': '120.0'
|
||||
'schedule': crontab(hour=9, minute=0) # 每天上午9点执行
|
||||
},
|
||||
},
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user