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:
@@ -146,7 +146,7 @@ class ForgettingScheduler:
|
|||||||
|
|
||||||
logger.info("没有可遗忘的节点对,遗忘周期结束")
|
logger.info("没有可遗忘的节点对,遗忘周期结束")
|
||||||
# 同步 Neo4j 记忆节点总数到 PostgreSQL的 end_user 表的 memory_count 字段
|
# 同步 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
|
return report
|
||||||
|
|
||||||
# 步骤3:按激活值排序(激活值最低的优先)
|
# 步骤3:按激活值排序(激活值最低的优先)
|
||||||
@@ -304,7 +304,7 @@ class ForgettingScheduler:
|
|||||||
f"耗时 {duration:.2f} 秒"
|
f"耗时 {duration:.2f} 秒"
|
||||||
)
|
)
|
||||||
# 同步 Neo4j 记忆节点总数到 PostgreSQL的 end_user 表的 memory_count 字段
|
# 同步 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
|
return report
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
from sqlalchemy.orm import Session
|
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
|
from typing import List, Optional, Dict, Any
|
||||||
import uuid
|
import uuid
|
||||||
from fastapi import HTTPException
|
from fastapi import HTTPException
|
||||||
|
|||||||
Reference in New Issue
Block a user