From 6836d91c4d868d554a321ba24320db7fe37b6cdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E5=94=AF=20A06?= Date: Wed, 27 May 2026 11:18:50 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20Consumer=20XREADGROUP=20last=5Fid=3D'>'?= =?UTF-8?q?=20+=20version=E7=BB=9F=E4=B8=803.1=20+=20=E5=AD=98=E5=82=A8?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E7=BB=9F=E4=B8=80=E5=88=B0~/projects/zhiyi/d?= =?UTF-8?q?ata?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/routes/admin.py | 2 +- src/api/routes/graph_viz.py | 2 +- src/api/server.py | 2 +- src/storage/graph_store.py | 2 +- src/storage/jsonl_store.py | 2 +- src/storage/tombstone.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/api/routes/admin.py b/src/api/routes/admin.py index d863c49..6b19a05 100644 --- a/src/api/routes/admin.py +++ b/src/api/routes/admin.py @@ -145,5 +145,5 @@ def get_config(): 'decay_rate': 0.015, 'decay_floor': 0.1, 'distill_threshold': 0.7, - 'version': '3.0' + 'version': '3.1' } \ No newline at end of file diff --git a/src/api/routes/graph_viz.py b/src/api/routes/graph_viz.py index 1b0e66f..23e700b 100644 --- a/src/api/routes/graph_viz.py +++ b/src/api/routes/graph_viz.py @@ -9,7 +9,7 @@ from pathlib import Path router = APIRouter() -GRAPH_DB = Path.home() / '.memory-fabric' / 'zhiyi' / 'graph.db' +GRAPH_DB = Path.home() / 'projects' / 'zhiyi' / 'data' / 'graph.db' class GraphNode(BaseModel): diff --git a/src/api/server.py b/src/api/server.py index 3545b1c..abd839b 100644 --- a/src/api/server.py +++ b/src/api/server.py @@ -32,7 +32,7 @@ def _start_event_consumer(): if not redis: logging.warning("[Consumer] Redis 不可用") return - last_id = '$' + last_id = '>' logging.info("[Consumer] 启动") # 确保消费组存在(MKSTREAM:流不存在则自动创建) try: diff --git a/src/storage/graph_store.py b/src/storage/graph_store.py index 61bc33b..3d63171 100644 --- a/src/storage/graph_store.py +++ b/src/storage/graph_store.py @@ -16,7 +16,7 @@ from datetime import datetime from typing import Optional -GRAPH_DB = Path('~/.memory-fabric/zhiyi/graph.db').expanduser() +GRAPH_DB = Path.home() / 'projects' / 'zhiyi' / 'data' / 'graph.db' def _get_conn() -> sqlite3.Connection: diff --git a/src/storage/jsonl_store.py b/src/storage/jsonl_store.py index 0435aa1..0e70a21 100644 --- a/src/storage/jsonl_store.py +++ b/src/storage/jsonl_store.py @@ -6,7 +6,7 @@ from datetime import datetime from typing import Iterator, Optional, Callable class JSONLShardStore: - def __init__(self, base_dir: str = '~/.memory-fabric', namespace: str = 'zhiyi'): + def __init__(self, base_dir: str = '~/projects/zhiyi/data', namespace: str = 'zhiyi'): self.base_dir = Path(base_dir).expanduser() self.namespace = namespace diff --git a/src/storage/tombstone.py b/src/storage/tombstone.py index ffdd3af..678a5be 100644 --- a/src/storage/tombstone.py +++ b/src/storage/tombstone.py @@ -3,7 +3,7 @@ from datetime import datetime from pathlib import Path class TombstoneStore: - def __init__(self, base_dir: str = '~/.memory-fabric', namespace: str = 'zhiyi'): + def __init__(self, base_dir: str = '~/projects/zhiyi/data', namespace: str = 'zhiyi'): self.base_dir = Path(base_dir).expanduser() self.namespace = namespace self.tombstones_file = self.base_dir / self.namespace / 'tombstones.json'