From 2bbf5e1c59abe50e81e596891b6fb332a1250237 Mon Sep 17 00:00:00 2001 From: UnCLAS-Prommer Date: Tue, 8 Jul 2025 23:43:15 +0800 Subject: [PATCH] fix ruff again --- src/chat/normal_chat/normal_chat.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/chat/normal_chat/normal_chat.py b/src/chat/normal_chat/normal_chat.py index 51642a700..ec73be5f1 100644 --- a/src/chat/normal_chat/normal_chat.py +++ b/src/chat/normal_chat/normal_chat.py @@ -304,7 +304,7 @@ class NormalChat: semaphore = asyncio.Semaphore(5) - async def process_and_acquire(msg_id, message, interest_value, is_mentioned): + async def process_and_acquire(msg_id, message, interest_value, is_mentioned, semaphore): """处理单个兴趣消息并管理信号量""" async with semaphore: try: @@ -334,7 +334,7 @@ class NormalChat: self.interest_dict.pop(msg_id, None) tasks = [ - process_and_acquire(msg_id, message, interest_value, is_mentioned) + process_and_acquire(msg_id, message, interest_value, is_mentioned, semaphore) for msg_id, (message, interest_value, is_mentioned) in items_to_process ]