This is the pseudo code:
from flask import Flask
app = Flask(__name__)
@app.route('/')
def test():
result1 = step 1 # This can do something
return result1
result2 = step 2 # This can do something
return result2
if __name__ == '__main__':
app.run()
step2 must rely on step1, so I think they can not be separated in two request. But because they need some time, so I can not wait for their finish. And I want to know their speed of progress, so I want it to response after every step. How should I do to do it?(There is no database, I can only use cookie.)
Aucun commentaire:
Enregistrer un commentaire