fix(memory): call renamed memory count sync method

- Update forgetting cycle call sites to use _sync_memory_count_to_db
This commit is contained in:
miao
2026-04-29 18:04:14 +08:00
parent 1d73c9e5a8
commit f86c023477
2 changed files with 3 additions and 3 deletions

View File

@@ -146,7 +146,7 @@ class ForgettingScheduler:
logger.info("没有可遗忘的节点对,遗忘周期结束")
# 同步 Neo4j 记忆节点总数到 PostgreSQL的 end_user 表的 memory_count 字段
await self._sync_memory_count_to_mysql(end_user_id)
await self._sync_memory_count_to_db(end_user_id)
return report
# 步骤3按激活值排序激活值最低的优先
@@ -304,7 +304,7 @@ class ForgettingScheduler:
f"耗时 {duration:.2f}"
)
# 同步 Neo4j 记忆节点总数到 PostgreSQL的 end_user 表的 memory_count 字段
await self._sync_memory_count_to_mysql(end_user_id)
await self._sync_memory_count_to_db(end_user_id)
return report
except Exception as e:

View File

@@ -1,5 +1,5 @@
from sqlalchemy.orm import Session
from sqlalchemy import desc, nullslast, or_, and_, cast, String, func
from sqlalchemy import desc, nullslast, or_, cast, String, func
from typing import List, Optional, Dict, Any
import uuid
from fastapi import HTTPException