python - Test if a celery task is still being processed -


how can test if task (task_id) still processed in celery? have following scenario:

  1. start task in django view
  2. store baseasyncresult in session
  3. shutdown celery daemon (hard) task not processed anymore
  4. check if task 'dead'

any ideas? can lookup task being processed celery , check if mine still there?

define field (pickledobjectfield) in model store 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 task not specific on model should create 1 celery tasks.

or else suggest using django-celery. has nice monitoring feature:
http://ask.github.com/celery/userguide/monitoring.html#django-admin-monitor, saves tasks details in django model in nice graphical way.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -