From 472f441c0e3e195efeed046778565c03a5f11c61 Mon Sep 17 00:00:00 2001 From: Mr Chen Date: Sat, 2 Nov 2024 02:47:47 +0800 Subject: [PATCH] update --- new_cli.sh | 6 +++--- panel_task.py | 6 +++--- scripts/rememory.sh | 2 +- web/app.py | 1 - web/utils/system/monitor.py | 6 ++++++ 5 files changed, 13 insertions(+), 8 deletions(-) diff --git a/new_cli.sh b/new_cli.sh index 8dcd7cd3f..33bfe5bd5 100755 --- a/new_cli.sh +++ b/new_cli.sh @@ -65,12 +65,12 @@ mw_start_debug(){ mw_start_debug2(){ python3 panel_task.py >> $DIR/logs/panel_task.log 2>&1 & - gunicorn -b :7200 -w 1 app:app + cd ${DIR}/web && gunicorn -b :7200 -w 1 app:app } mw_start_debug3(){ - gunicorn -c setting.py app:app - python3 panel_task.py + cd ${DIR}/web && gunicorn -c setting.py app:app + cd ${DIR} && python3 panel_task.py } diff --git a/panel_task.py b/panel_task.py index c5d18a68a..8382b29bb 100755 --- a/panel_task.py +++ b/panel_task.py @@ -584,9 +584,9 @@ def setDaemon(t): def run(): # # 系统监控 - # sysTask = threading.Thread(target=systemTask) - # sysTask = setDaemon(sysTask) - # sysTask.start() + sysTask = threading.Thread(target=systemTask) + sysTask = setDaemon(sysTask) + sysTask.start() # # PHP 502错误检查线程 # php502 = threading.Thread(target=check502Task) diff --git a/scripts/rememory.sh b/scripts/rememory.sh index 933f7eff2..5311e7aa6 100755 --- a/scripts/rememory.sh +++ b/scripts/rememory.sh @@ -32,7 +32,7 @@ fi echo "OpenResty -- END" -PHP_VER_LIST=(53 54 55 56 70 71 72 73 74 80 81) +PHP_VER_LIST=(53 54 55 56 70 71 72 73 74 80 81 82 83 84) for PHP_VER in ${PHP_VER_LIST[@]}; do echo "PHP${PHP_VER} -- START" if [ -f /usr/lib/systemd/system/php${PHP_VER}.service ];then diff --git a/web/app.py b/web/app.py index b51d018a1..aa0fe2680 100644 --- a/web/app.py +++ b/web/app.py @@ -20,7 +20,6 @@ import os if sys.path[0] != os.path.dirname(os.path.realpath(__file__)): sys.path.insert(0, os.path.dirname(os.path.realpath(__file__))) -# print(sys.path) import config from admin import app, socketio diff --git a/web/utils/system/monitor.py b/web/utils/system/monitor.py index 2f33b438a..1abb5db39 100644 --- a/web/utils/system/monitor.py +++ b/web/utils/system/monitor.py @@ -18,4 +18,10 @@ import psutil import core.mw as mw +class monitor: + + def initDBFile(): + pass + +