I’m using celery and django-celery. I have defined a periodic task that I’d like to test. Is it possible to run the periodic task from the shell manually so that I view the console output?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Have you tried just running the task from the Django shell? You can use the
.applymethod of a task to ensure that it is run eagerly and locally.Assuming the task is called
my_taskin Django appmyappin ataskssubmodule:The result instance has the same API as the usual
AsyncResulttype, except that the result is always evaluated eagerly and locally and the.apply()method will block until the task is run to completion.