python - Django celery custom periodic task not executing -
i tried using code try dynamically add / remove scheduled tasks.
my tasks.py file looks this:
from celery.decorators import task import logging log = logging.getlogger(__name__) @task def mytask(): log.debug("executing task") return
the problem tasks not execute (i.e there no log output), but following messages in celery log file, on schedule:
[2013-05-10 04:53:00,005: info/mainprocess] got task broker: cron.tasks.mytask[dfcf397b-e30b-45bd-9f5f-11a17a51b6c4] [2013-05-10 04:54:00,007: info/mainprocess] got task broker: cron.tasks.mytask[f013b3cd-6a0f-4060-8bcc-3bb51ffaf092] [2013-05-10 04:55:00,007: info/mainprocess] got task broker: cron.tasks.mytask[dfc0d563-ff4b-4132-955a-4293dd3a9ac7] [2013-05-10 04:56:00,012: info/mainprocess] got task broker: cron.tasks.mytask[ba093535-0d70-4dc5-89e4-441b72cfb61f]
i can confirm logger configured correctly , working fine. if try , call result = mytask.delay()
in interactive shell, result.state
indefinitely contain state pending
.
edit: see django celery periodic tasks run rabbitmq queues aren't consumed
Comments
Post a Comment