From adb620d87bb179e671e7d4f78a443411c8225373 Mon Sep 17 00:00:00 2001 From: midoks Date: Sun, 31 Oct 2021 23:56:02 +0800 Subject: [PATCH] update --- requirements.txt | 2 +- route/__init__.py | 3 +-- scripts/install_centos.sh | 6 +++--- setting.py | 2 +- task.py | 3 ++- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/requirements.txt b/requirements.txt index 6968b4f0f..9b1e3568f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,7 +9,7 @@ flask-caching==1.10.1 gunicorn==19.9 gevent==21.1.2 gevent-websocket -psutil==5.6.6 +psutil==5.8.0 chardet==3.0.4 flask-sqlalchemy==2.3.2 cryptography==3.3.2 diff --git a/route/__init__.py b/route/__init__.py index ac7946d33..3c92398ed 100755 --- a/route/__init__.py +++ b/route/__init__.py @@ -60,7 +60,7 @@ app.config['SESSION_USE_SIGNER'] = True app.config['SESSION_KEY_PREFIX'] = 'MW_:' app.config['SESSION_COOKIE_NAME'] = "MW_VER_1" app.config['PERMANENT_SESSION_LIFETIME'] = timedelta(days=31) -# Session(app) +Session(app) # socketio from flask_socketio import SocketIO, emit, send @@ -73,7 +73,6 @@ if mw.isAppleSystem(): app.debug = True app.config.version = app.config.version + str(time.time()) - import common common.init() diff --git a/scripts/install_centos.sh b/scripts/install_centos.sh index 882bd3168..a18430586 100755 --- a/scripts/install_centos.sh +++ b/scripts/install_centos.sh @@ -97,9 +97,9 @@ yum -y install python36-devel cd /www/server/mdserver-web/scripts && ./lib.sh -pip3 install -r /www/server/mdserver-web/requirements.txt - - +#venv +cd /www/server/mdserver-web && python3 -m venv /www/server/mdserver-web +cd /www/server/mdserver-web && source bin/activate && pip3 install -r /www/server/mdserver-web/requirements.txt cd /www/server/mdserver-web && ./cli.sh start sleep 5 diff --git a/setting.py b/setting.py index 2d56f03c6..6df5482eb 100755 --- a/setting.py +++ b/setting.py @@ -38,7 +38,7 @@ threads = workers * 1 backlog = 512 reload = False daemon = True -worker_class = 'geventwebsocket.gunicorn.workers.GeventWebSocketWorker' +#worker_class = 'geventwebsocket.gunicorn.workers.GeventWebSocketWorker' timeout = 7200 keepalive = 60 preload_app = True diff --git a/task.py b/task.py index b1f4b186d..a87523e2d 100755 --- a/task.py +++ b/task.py @@ -12,10 +12,11 @@ import threading sys.path.append(os.getcwd() + "/class/core") +import mw + # reload(sys) # sys.setdefaultencoding('utf-8') import db -import mw cmd = 'ls /usr/local/lib/ | grep python | cut -d \\ -f 1 | awk \'END {print}\''