diff --git a/apps/jqr/tasks.py b/apps/jqr/tasks.py index e69de29..037886d 100644 --- a/apps/jqr/tasks.py +++ b/apps/jqr/tasks.py @@ -0,0 +1,7 @@ +from celery import shared_task + + +@shared_task(name='save_add_contact') +def save_add_contact(*args, **kwargs): + print(args) + print(kwargs) diff --git a/yzk_wechat_event/celery.py b/yzk_wechat_event/celery.py index 966d0fd..36f0b63 100644 --- a/yzk_wechat_event/celery.py +++ b/yzk_wechat_event/celery.py @@ -14,14 +14,10 @@ app.autodiscover_tasks() # 定时任务的调度列表,用于注册定时任务 app.conf.beat_schedule = { - 'warning_log': { - 'task': 'warning_log', - 'schedule': timedelta(minutes=1), - }, - 'check_authorization_task': { - 'task': 'check_authorization_task', - 'schedule': timedelta(minutes=30), - }, + # 'warning_log': { + # 'task': 'warning_log', + # 'schedule': timedelta(minutes=1), + # }, } task_routes = {