【发布时间】:2018-04-12 16:34:44
【问题描述】:
def get(self, name):
//accept the parameters and parse the parameters
//genereate UUID
return{UUID : 'request accepted'}, 200 if item else 404
generate_doc(parameters, UUID)
//process the request after the return happens with the parameters from GET
我需要做这样的事情。在对 GET 请求做出响应后,我必须调用一个函数来执行某些操作。我想这样做是因为我尝试创建的文件需要一些时间。所以我想先发送请求,然后生成文件。
应用开始运行后,我无法控制程序流程。谁能帮我解决这个问题。
【问题讨论】:
-
我正在使用芹菜。它是如此简单易用。
标签: python-3.x rest flask flask-restful flask-restplus