From 38cb74517e326bc1558b1da45e2dcf8e49994b2e Mon Sep 17 00:00:00 2001 From: liuwei Date: Mon, 22 Dec 2025 15:48:59 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- robot.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/robot.py b/robot.py index eeac484..a27f744 100644 --- a/robot.py +++ b/robot.py @@ -230,7 +230,7 @@ class Robot: self.LOG.info("开始处理wechat_ipad消息") while self.ipad_running: try: - data = await self.ipad_bot.sync_message() + data_temp = await self.ipad_bot.sync_message() except Exception as e: self.LOG.error(f"获取新消息失败 {e}") if "用户可能退出" in str(e): @@ -242,7 +242,7 @@ class Robot: await asyncio.sleep(5) continue - data = data.get("AddMsgs") + data = data_temp.get("AddMsgs") if data: for message in data: # self.LOG.debug(f"sync_message.处理消息消息内容: {message}") @@ -262,7 +262,7 @@ class Robot: # 并发执行,限制最大并发数 xx = asyncio.create_task(self._process_with_semaphore(wxmsg)) else: - self.LOG.debug(f"MESSAGE:{data}") + self.LOG.debug(f"MESSAGE:{data_temp}") # 使用异步睡眠替代忙等待循环 await asyncio.sleep(2)