Assuming the task is called my_task
in Django app myapp
in a tasks
submodule:
$ python manage.py shell
>>> from myapp.tasks import my_task
>>> eager_result = my_task.apply()
The result instance has the same API as the usual AsyncResult
type, except that the result is always evaluated eagerly and locally and the .apply()
method will block until the task is run to completion.