I have in my web project a time consuming function. While the function is doing its computations, a web page should be rendered informing the user that the results will be sent by email once the computation is done.
If I put the rendering after the function call, the web page wont be rendered until after the time_consuming_function() had finished and that would make the response senseless.
views.py:
def web_function(request):
...
time_consuming_function()
return HttpResponse()
Is python threading the only way to go?
Update
Ended up using cellery, since it seemed better documented than ztaskd
I suggest you look at a task-scheduling framework, such as Celery (or just plain Rabbit MQ)