阅读背景:

如何在Django视图中最好地启动异步作业请求?

来源:互联网 

One of my view functions is a very long processing job and clearly needs to be handled differently. Instead of making the user wait for long time, it would be best if I were able to lunch the processing job which would email the results, and without waiting for completion notify the user that their request is being processed and let them browse on. I know I can use os.fork, but I was wondering if there is a 'right way' in terms of Django. Perhaps I can return the HTTP response, and than go on with this job somehow?One of my view functions is a very long process




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: