简体   繁体   English

python flask app.run 我如何在 python 代码中自动停止 Z319C3206A7F10C17C3B91116DDA4

[英]python flask app.run how do I automatically in python code stop flask after all tests are completed

I have a code which already works fine and process my stuff我有一个已经可以正常工作并处理我的东西的代码

    app.secret_key = 'my Top Secret'
    app.run(debug=True, use_reloader=False)

but when all my tests are completed how do I stop flask from running in code not from command line using python code但是当我的所有测试都完成后,我如何停止 flask 使用 python 代码在代码中运行而不是从命令行运行

THis isi the answer这就是答案

public_url = ngrok.connect(port=5900, proto='tcp', config_path='~/.ngrok2/ngrok.yml')

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 调用 Flask app.run 后,我可以让 Python 代码继续执行吗? - Can I have Python code to continue executing after I call Flask app.run? 如何停止烧瓶app.run()? - How to stop flask app.run()? app.run 的 Python 烧瓶错误 - Python flask error with app.run 如何在 flask API Python 中移出 app.run() - How to move out of app.run() in flask API Python How to excecute code after Flask `app.run()` statement (run a Flask app and a function in parallel, execute code while Flask server is running) - How to excecute code after Flask `app.run()` statement (run a Flask app and a function in parallel, execute code while Flask server is running) 如何在 flask 中运行 app.run() 之前的代码? - how to run the code before the app.run() in flask? Python Flask app.run 不可访问,IP 未显示在终端中 - Python Flask app.run is not rechable, IP not showing in terminal 如何使用FLASK python app.run()动态加载excel数据一次 - how to load excel data dynamically only once using FLASK python app.run() How do I tell Jenkins to run a Python Flask application, then Selenium tests, then close the Flask application? - How do I tell Jenkins to run a Python Flask application, then Selenium tests, then close the Flask application? Flask 日志错误:app.run (Python 3.8) 上的“TypeError findCaller() 需要 1 到 2 个位置参数,但给出了 3 个” - Flask logging error: "TypeError findCaller() takes from 1 to 2 position arguments but 3 were given" on app.run (Python 3.8)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM