when i run this command for celery beat.
[2013-06-27 02:17:05,936: INFO/MainProcess] Celerybeat: Starting...
[2013-06-27 02:17:05,937: INFO/MainProcess] Writing entries...
[2013-06-27 02:17:08,711: INFO/MainProcess] DatabaseScheduler: Schedule changed.
[2013-06-27 02:17:08,712: INFO/MainProcess] Writing entries...
it is stuck on this result. but in my settings.py I have configured the CELERYBEAT_SCHEDULE.
CELERYBEAT_SCHEDULER = "djcelery.schedulers.DatabaseScheduler"
from datetime import timedelta
CELERYBEAT_SCHEDULE = {
'add-every-30-seconds': {
'task': 'celerytest.tasks.add',
'schedule': timedelta(seconds=30),
'args': (16, 16)
},
'add-every-10-seconds': {
'task': 'celerytest.tasks.minus',
'schedule': timedelta(seconds=10),
'args': (20, 16)
},
}
What's wrong with my celery beat?
The celery beat
command starts the celery scheduler. This process schedules tasks and places them in a queue periodically. It does not execute tasks.
You need to start celery beat
and celery worker
(I guess you are using django-celery):
python manage.py celery beat
python manage.py celery worker
Or simply:
python manage.py celery worker --beat