python flask框架 app.debug=True时,启动脚本被执行了2次

Posted SUN_DRAGON

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python flask框架 app.debug=True时,启动脚本被执行了2次相关的知识,希望对你有一定的参考价值。

The first thing it does is start the main function in a new thread so it can monitor >the source files and restart the thread when they change.

http://stackoverflow.com/questions/9276078/whats-the-right-approach-for-calling-functions-after-a-flask-app-is-run

如果你想要避免加载两次,应该设置app.run(debug=True, use_reloader=False)

以上是关于python flask框架 app.debug=True时,启动脚本被执行了2次的主要内容,如果未能解决你的问题,请参考以下文章