>>> from app.tasks import SendSomething
>>> eager_result = SendSomething().apply()
为什么我的任务只有在我在 shell(manage.py shell)中手动运行时才有效?
设置.py
from datetime import timedelta
CELERYBEAT_SCHEDULE = {'send-something':
{'task': 'app.tasks.SendSomething',
'schedule': timedelta(seconds=300),
}}
我跑:
python manage.py celeryd
我有:
[Tasks] . app.tasks.SendSomething
[2013-05-01 18:44:22,895: WARNING/MainProcess] celery@aaa ready.
但不工作。