I have a Celery task registered in my tasks.py file. When someone POST to / run / pk starts a task with the given parameters. This task also performs other tasks (normal Python functions), and I would like to refresh my page (returned by HttpResponse in / run / pk) whenever the subtask completes its work.
Here is my task:
from celery.decorators import task @task def run(project, branch=None): if branch is None: branch = project.branch print 'Creating the virtualenv' create_virtualenv(project, branch) print 'Virtualenv created'
rubik source share