Todo: 集成多平台 解决PDD打包后js文件位置检索问题

Todo: 集成多平台 解决打包日志规划问题
Todo: 集成多平台 解决后端连接心跳与重连管理问题
This commit is contained in:
2025-09-20 16:13:23 +08:00
parent 7cfc0c22b7
commit 8ad02b4416
6 changed files with 447 additions and 64 deletions

View File

@@ -8,10 +8,10 @@ import os # 用于路径与目录操作(写入用户配置目录)
import json # 用于将令牌保存为 JSON 格式
# 后端服务器配置
# BACKEND_HOST = "192.168.5.197"
# BACKEND_HOST = "192.168.5.197"
# BACKEND_HOST = "shuidrop.com"
BACKEND_HOST = "test.shuidrop.com"
# BACKEND_HOST = "192.168.5.233"
# BACKEND_HOST = "192.168.5.12"
BACKEND_HOST = "shuidrop.com"
# BACKEND_HOST = "test.shuidrop.com"
# BACKEND_PORT = "8000"
BACKEND_PORT = ""
# BACKEND_WS_URL = f"ws://{BACKEND_HOST}:{BACKEND_PORT}"
@@ -20,8 +20,14 @@ BACKEND_WS_URL = f"wss://{BACKEND_HOST}"
# WebSocket配置
WS_CONNECT_TIMEOUT = 16.0
WS_MESSAGE_TIMEOUT = 30.0
WS_PING_INTERVAL = 20
WS_PING_TIMEOUT = 10
WS_PING_INTERVAL = 10 # 10秒ping间隔提高检测频率
WS_PING_TIMEOUT = 5 # 5秒ping超时更快检测断线
WS_ENABLE_PING = True # 是否启用WebSocket原生ping心跳
WS_ENABLE_APP_PING = False # 禁用应用层ping心跳避免重复
# AI处理超时配置
AI_PROCESS_TIMEOUT = 30 # AI处理超时时间
AI_LONG_PROCESS_THRESHOLD = 10 # AI长时间处理阈值
# 内存管理配置
MAX_PENDING_REPLIES = 100