fix 上下文出错的bug

This commit is contained in:
xaoyaoo 2024-08-04 21:22:21 +08:00
parent 7d27d566cc
commit 33803a44ce
2 changed files with 59 additions and 59 deletions

View File

@ -27,4 +27,4 @@ except:
# PYWXDUMP_ROOT_PATH = os.path.dirname(__file__) # PYWXDUMP_ROOT_PATH = os.path.dirname(__file__)
# db_init = DBPool("DBPOOL_INIT") # db_init = DBPool("DBPOOL_INIT")
__version__ = "3.1.2" __version__ = "3.1.3"

View File

@ -57,7 +57,7 @@ def start_falsk(merge_path="", wx_path="", key="", my_wxid="", port=5000, online
host = "127.0.0.1" host = "127.0.0.1"
app = Flask(__name__, template_folder='./ui/web', static_folder='./ui/web/assets/', static_url_path='/assets/') app = Flask(__name__, template_folder='./ui/web', static_folder='./ui/web/assets/', static_url_path='/assets/')
with app.app_context():
# 设置超时时间为 1000 秒 # 设置超时时间为 1000 秒
app.config['TIMEOUT'] = 1000 app.config['TIMEOUT'] = 1000
app.secret_key = 'secret_key' app.secret_key = 'secret_key'
@ -122,7 +122,7 @@ def start_falsk(merge_path="", wx_path="", key="", my_wxid="", port=5000, online
time.sleep(1) time.sleep(1)
server_loger.info(f"启动flask服务host:port{host}:{port}") server_loger.info(f"启动flask服务host:port{host}:{port}")
print("[+] 请使用浏览器访问 http://127.0.0.1:5000/ 查看聊天记录") print("[+] 请使用浏览器访问 http://127.0.0.1:5000/ 查看聊天记录")
app.run(host=host, port=port, debug=debug) app.run(host=host, port=port, debug=debug, threaded=False)
if __name__ == '__main__': if __name__ == '__main__':