去掉心跳包内容

This commit is contained in:
liuwei
2025-12-22 15:51:29 +08:00
parent 38cb74517e
commit c1f927a425

View File

@@ -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)