如何以编程方式重新启动 Bottle 应用程序?
def error_handler(error):
if error.message == "connection already closed":
RESTART_BOTTLE_SERVER() # This will reacquire connection
最佳答案
您可以使用this answer中描述的方法停止 Bottle 应用程序(线程)。 .
关于python - 重新启动 Bottle 应用程序(以编程方式),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30318184/