fix: 调整兴趣匹配计算超时设置和消息读取限制,优化性能
This commit is contained in:
@@ -395,7 +395,7 @@ async def _calculate_interest_match_score(self, content: str, keywords: list[str
|
||||
|
||||
except asyncio.TimeoutError:
|
||||
# 超时时返回默认分值 0.5
|
||||
logger.warning("⏱️ 兴趣匹配计算超时(>1.5秒),返回默认分值0.5以保留其他分数")
|
||||
logger.warning("⏱️ 兴趣匹配计算超时(>5秒),返回默认分值0.5以保留其他分数")
|
||||
return 0.5 # 避免丢失提及分和关系分
|
||||
|
||||
except Exception as e:
|
||||
|
||||
@@ -15,7 +15,7 @@ from src.config.config import global_config
|
||||
logger = get_logger(__name__)
|
||||
|
||||
|
||||
SAFE_FETCH_LIMIT = 5000 # 防止一次性读取过多行导致内存暴涨
|
||||
SAFE_FETCH_LIMIT = 1000 # 防止一次性读取过多行导致内存暴涨
|
||||
|
||||
|
||||
class Base(DeclarativeBase):
|
||||
|
||||
Reference in New Issue
Block a user