How can I test if a task (task_id) is still processed in celery? I have the following scenario:
- Start a task in a Django view
- Store the BaseAsyncResult in the session
- Shutdown the celery daemon (hard) so the task is not processed anymore
- Check if the task is 'dead'
Any ideas? Can a lookup all task being processed by celery and check if mine is still there?
define a field (PickledObjectField) in your model to store the celery task:
In case your task is not specific on any model you should create one specifically for the celery tasks.
or else I suggest using django-celery. It has a nice monitoring feature:
http://ask.github.com/celery/userguide/monitoring.html#django-admin-monitor, saves the tasks details in a django model in a nice graphical way.
I think there is a better way than to store a task object in the model. For example, in case you wanted to check if a group of task (parallel) have completed:
Then in your view