How can I test if a task (task_id) is still processed in celery? I have the following scenario:
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:
class YourModel(models.Model):
.
.
celery_task = PickledObjectField()
.
.
def task():
self.celery_task = SubmitTask.apply_async(args = self.task_detail())
self.save()
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With