, , , .
, django:
from django.core.cache import cache
@app.task()
def long_running_task(self, *args, **kwargs):
key = "my_task: %s" % self.result.id
...
cache.set(key, progress, timeout="whatever works for you")
...
, , AJAX GET . - :
def task_progress_view(request, *args, **kwargs):
key = request.GET.get('task_key')
progress = cache.get(key)
return HttpResponse(content=json.dumps({'progress': progress}),
content_type="application/json; charset=utf-8")
, , , , - memcached, django . , , task_id , .