我想知道这里的正确方法是什么,在谷歌搜索时找不到任何关于此的数据:
假设我有班级:
class OkPayPaymentChecker(BasePaymentChecker):
pass
in'nexchnage / tasks.py'
此任务的正确CELERY_BEAT_SCHEDULE
条目是什么?
是吗:
CELERY_BEAT_SCHEDULE = {
'check_okpay_payments': {
'task': 'nexchange.tasks.OkPayPaymentChecker',
'schedule': timedelta(seconds=60),
},
}
或者应该先用它创建一个实例?
未答复的相关问题:
Celery beat with method tasks not working
Celery Beat: How to define periodic tasks defined as classes (class based tasks)