加入了LOGO,

This commit is contained in:
liuwei
2025-04-14 17:39:14 +08:00
parent b6a4a58ec4
commit 7dfe5c130a
2 changed files with 137 additions and 81 deletions

View File

@@ -11,6 +11,8 @@ from collections import deque
# 创建系统信息蓝图
system_bp = Blueprint('system', __name__)
logger = logging.getLogger("SystemBlueprint")
# 记录应用启动时间
APP_START_TIME = time.time()
# 页面路由
@system_bp.route('/wx_logs')
@@ -31,7 +33,7 @@ def api_system_info():
"cpu_usage": psutil.cpu_percent(),
"memory_usage": psutil.virtual_memory().percent,
"disk_usage": psutil.disk_usage('/').percent,
"uptime": time.time() - psutil.boot_time(),
"uptime": time.time() - APP_START_TIME, # 使用应用启动时间计算运行时长
"timestamp": datetime.now().strftime("%Y-%m-%d %H:%M:%S")
}