fix:修复表达权重爆炸的问题,修复数据库Bug

This commit is contained in:
SengokuCola
2025-06-25 20:39:20 +08:00
parent 2a44bb2db9
commit cdb0912b5a
3 changed files with 25 additions and 32 deletions

View File

@@ -293,7 +293,7 @@ class PersonImpressionpProcessor(BaseProcessor):
}
segments.append(new_segment)
person_name = get_person_info_manager().get_value(person_id, "person_name")
person_name = get_person_info_manager().get_value(person_id, "person_name") or person_id
logger.info(
f"{self.log_prefix} 眼熟用户 {person_name}{time.strftime('%H:%M:%S', time.localtime(potential_start_time))} - {time.strftime('%H:%M:%S', time.localtime(message_time))} 之间有 {new_segment['message_count']} 条消息"
)
@@ -341,6 +341,7 @@ class PersonImpressionpProcessor(BaseProcessor):
"message_count": self._count_messages_in_timerange(potential_start_time, message_time),
}
segments.append(new_segment)
person_name = get_person_info_manager().get_value(person_id, "person_name") or person_id
logger.info(f"{self.log_prefix} 重新眼熟用户 {person_name} 创建新消息段超过10条消息间隔: {new_segment}")
self._save_cache()