Merge pull request #872 from midoks/dev

更新
This commit is contained in:
Mr Chen
2026-04-05 15:28:24 +08:00
committed by GitHub
6 changed files with 11 additions and 7 deletions
+2 -2
View File
@@ -60,7 +60,7 @@ mw_start_debug(){
if [ -f ${DIR}/data/port.pl ];then if [ -f ${DIR}/data/port.pl ];then
port=$(cat ${DIR}/data/port.pl) port=$(cat ${DIR}/data/port.pl)
fi fi
cd ${DIR}/web && gunicorn -b :${port} -k eventlet -w 1 app:app cd ${DIR}/web && gunicorn -b :${port} -k gthread -w 1 app:app
# cd ${DIR}/web && gunicorn -b :${port} -k geventwebsocket.gunicorn.workers.GeventWebSocketWorker -w 1 app:app # cd ${DIR}/web && gunicorn -b :${port} -k geventwebsocket.gunicorn.workers.GeventWebSocketWorker -w 1 app:app
} }
@@ -69,7 +69,7 @@ mw_start_panel(){
if [ -f ${DIR}/data/port.pl ];then if [ -f ${DIR}/data/port.pl ];then
port=$(cat ${DIR}/data/port.pl) port=$(cat ${DIR}/data/port.pl)
fi fi
cd ${DIR}/web && gunicorn -b :${port} -k eventlet -w 1 app:app cd ${DIR}/web && gunicorn -b :${port} -k gthread -w 1 app:app
# cd ${DIR}/web && gunicorn -b :${port} -k geventwebsocket.gunicorn.workers.GeventWebSocketWorker -w 1 app:app # cd ${DIR}/web && gunicorn -b :${port} -k geventwebsocket.gunicorn.workers.GeventWebSocketWorker -w 1 app:app
} }
+3
View File
@@ -11,6 +11,9 @@ export PATH
# curl -I -H "Accept-Encoding: zstd" http://localhost # curl -I -H "Accept-Encoding: zstd" http://localhost
# curl --http3 -v https://www.xxx.com # curl --http3 -v https://www.xxx.com
# apt install ncat -y
# nc -u -v www.xxmhaa.com 443
# cd /www/server/mdserver-web && python3 plugins/openresty/index.py run_info # cd /www/server/mdserver-web && python3 plugins/openresty/index.py run_info
curPath=`pwd` curPath=`pwd`
+1 -1
View File
@@ -12,7 +12,7 @@ flask-caching>=1.10.1
cache==1.0.3 cache==1.0.3
gevent>=22.10.2 gevent>=22.10.2
gevent-websocket==0.10.1 gevent-websocket==0.10.1
eventlet>=0.24.1
psutil==5.9.1 psutil==5.9.1
chardet==3.0.4 chardet==3.0.4
SQLAlchemy>=1.4.54 SQLAlchemy>=1.4.54
+1 -1
View File
@@ -474,7 +474,7 @@ mw_debug(){
cd ${PANEL_DIR}/web cd ${PANEL_DIR}/web
fi fi
# gunicorn -b :$port -k geventwebsocket.gunicorn.workers.GeventWebSocketWorker -w 1 app:app # gunicorn -b :$port -k geventwebsocket.gunicorn.workers.GeventWebSocketWorker -w 1 app:app
gunicorn -b :$port -k eventlet -w 1 app:app gunicorn -b :$port -k gthread -w 1 app:app
} }
mw_connect_mysql(){ mw_connect_mysql(){
+2
View File
@@ -48,6 +48,8 @@ app = Flask(__name__, template_folder='templates/default')
# curl --compressed -I "http://127.0.0.1:44010/" -H "Accept-Encoding: zstd" --write-out "%{json}" # curl --compressed -I "http://127.0.0.1:44010/" -H "Accept-Encoding: zstd" --write-out "%{json}"
app.config["COMPRESS_ALGORITHM"] = ["zstd", "br", "gzip", "deflate"] app.config["COMPRESS_ALGORITHM"] = ["zstd", "br", "gzip", "deflate"]
app.config["COMPRESS_LEVEL"] = 9 # 最高压缩级别
app.config["COMPRESS_MIN_SIZE"] = 500 # 最小压缩大小
Compress(app) Compress(app)
# 缓存配置 # 缓存配置
+2 -3
View File
@@ -12,8 +12,7 @@
# 配置文件 # 配置文件
# --------------------------------------------------------------------------------- # ---------------------------------------------------------------------------------
import eventlet
eventlet.monkey_patch()
import time import time
import sys import sys
@@ -81,7 +80,7 @@ backlog = 512
reload = False reload = False
daemon = True daemon = True
# # worker_class = 'geventwebsocket.gunicorn.workers.GeventWebSocketWorker' # # worker_class = 'geventwebsocket.gunicorn.workers.GeventWebSocketWorker'
worker_class = 'eventlet' worker_class = 'gthread'
timeout = 600 timeout = 600
keepalive = 60 keepalive = 60
preload_app = False preload_app = False