I am using django-celery to implementing periodic tasks flowing the doc. And I started the celery worker and beat successfully:
[tasks]
. scheduler.tasks.test
Scheduler is the name of my app. I configure the tasks in scheduler.tasks.py and save the periodic tasks in my view.py. But after I send a HTTP requset to create a periodic task, celery beat reports an error like this:
Traceback (most recent call last):
File "/myhome/lib/python2.7/site-packages/celery/worker/consumer.py", line 455, in on_task_received strategies[name](message, body,
KeyError: u'<@task: scheduler.tasks.test of myproj:0x7f8847449910>'
I googled and found some answers about relative import issues, but the task name in the error message is the same with that of the registered task.
What else may be the problem?
EDIT:
Another evidence of scheduler.tasks.test having been registered is that if I call test.delay() rather than make it a periodic task, it can be processed successfully.