把等待消息的日志修改为debug类型避免正常用的时候遇到:08-11 23:11:15 [聊天节奏] [Test] breaking形式当前累计兴趣值: 0.04, 当前聊天频率: 1.50

08-11 23:11:16 [聊天节奏] [Test] 已等待20秒,累计1条消息,继续等待...
08-11 23:11:17 [聊天节奏] [Test] 已等待21秒,累计1条消息,继续等待...
08-11 23:11:27 [聊天节奏] [Test] 已等待30秒,累计1条消息,继续等待...
08-11 23:11:27 [聊天节奏] [Test] 已等待31秒,累计1条消息,继续等待...
08-11 23:11:37 [聊天节奏] [Test] 已等待40秒,累计1条消息,继续等待...
08-11 23:11:47 [聊天节奏] [Test] 已等待50秒,累计1条消息,继续等待...
08-11 23:11:57 [聊天节奏] [Test] 已等待60秒,累计1条消息,继续等待...
08-11 23:12:07 [聊天节奏] [Test] 已等待70秒,累计1条消息,继续等待...
08-11 23:12:17 [聊天节奏] [Test] 已等待81秒,累计1条消息,继续等待...
类似的这种问题
This commit is contained in:
Navinatte
2025-08-11 23:23:39 +08:00
committed by Windpicker-owo
parent 325e646fcf
commit 86ead21af8

View File

@@ -302,10 +302,10 @@ class HeartFChatting:
)
return True, total_interest / new_message_count if new_message_count > 0 else 0.0
# 每10秒输出一次等待状态
if int(time.time() - self.last_read_time) > 0 and int(time.time() - self.last_read_time) % 15 == 0:
# 每10秒输出一次等待状态仅在debug模式下启用
if int(time.time() - self.last_read_time) > 0 and int(time.time() - self.last_read_time) % 10 == 0:
logger.debug(
f"{self.log_prefix} 已等待{time.time() - self.last_read_time:.0f}秒,累计{new_message_count}条消息,累计兴趣{total_interest:.1f}继续等待..."
f"{self.log_prefix} 已等待{time.time() - self.last_read_time:.0f}秒,累计{new_message_count}条消息,继续等待..."
)
await asyncio.sleep(0.5)