From c1f927a42545f9e7cb2f9ec9ef2d6bdbcb3b3486 Mon Sep 17 00:00:00 2001 From: liuwei Date: Mon, 22 Dec 2025 15:51:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E5=BF=83=E8=B7=B3=E5=8C=85?= =?UTF-8?q?=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- robot.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/robot.py b/robot.py index a27f744..8459b56 100644 --- a/robot.py +++ b/robot.py @@ -262,7 +262,9 @@ class Robot: # 并发执行,限制最大并发数 xx = asyncio.create_task(self._process_with_semaphore(wxmsg)) else: - self.LOG.debug(f"MESSAGE:{data_temp}") + # 只有当 Ret 不等于 0 或者 不包含 KeyBuf 时才打印 + if not (isinstance(data_temp, dict) and data_temp.get("Ret") == 0 and "KeyBuf" in data_temp): + self.LOG.debug(f"MESSAGE:{data_temp}") # 使用异步睡眠替代忙等待循环 await asyncio.sleep(2)