fix: 后端ws不再raise无连接错误;修复定时逻辑

This commit is contained in:
DLmaster361
2025-09-21 18:09:01 +08:00
parent 1c640c3df8
commit d5331b728d
2 changed files with 11 additions and 2 deletions

View File

@@ -966,7 +966,7 @@ class AppConfig(GlobalConfig):
async def send_json(self, data: dict) -> None:
"""通过WebSocket发送JSON数据"""
if Config.websocket is None:
raise RuntimeError("WebSocket 未连接")
logger.warning("WebSocket 未连接")
else:
await Config.websocket.send_json(data)