fix:修复发送api打字时间,现已成为可选参数。修复可能存在的回复图片问题,为数据库缺失字段提供警告

This commit is contained in:
SengokuCola
2025-06-14 19:21:02 +08:00
parent e4e14550c7
commit 790642afd6
9 changed files with 37 additions and 9 deletions

View File

@@ -199,11 +199,11 @@ class NormalChat:
# 使用信号量控制并发数最多同时处理5个消息
semaphore = asyncio.Semaphore(5)
async def limited_process(task):
async with semaphore:
async def limited_process(task, sem):
async with sem:
await task
limited_tasks = [limited_process(task) for task in tasks]
limited_tasks = [limited_process(task, semaphore) for task in tasks]
await asyncio.gather(*limited_tasks, return_exceptions=True)
except asyncio.CancelledError:
logger.info(f"[{self.stream_name}] 兴趣监控任务被取消")