[Bug Fix][Enhance] Endless loop & waitress log

- Fix a bug due to 6fcca17918 that there is a endless loop in calculating recent 10 updating

- Add info log for `waitress`
This commit is contained in:
Lost-MSth
2022-11-05 21:17:44 +08:00
parent 78d28f8886
commit 4a5083c597
5 changed files with 20 additions and 12 deletions

View File

@@ -98,6 +98,15 @@ def download(file_path):
return error_return()
if Config.DEPLOY_MODE == 'waitress':
# 给waitress加个日志
@app.after_request
def after_request(response):
app.logger.info(
f'B {request.remote_addr} - - {request.method} {request.path} {response.status_code}')
return response
def tcp_server_run():
if Config.DEPLOY_MODE == 'gevent':
# 异步 gevent WSGI server