fix: list_collections 异常向上传播而非静默吞掉
This commit is contained in:
+2
-5
@@ -54,11 +54,8 @@ class AppState:
|
||||
def list_collections_with_stats(self) -> list[dict]:
|
||||
"""列出所有 collection 及其统计(直接从 ChromaDB 查询)."""
|
||||
result = []
|
||||
try:
|
||||
for coll in self.db.list_collections():
|
||||
result.append({"name": coll.name, "count": coll.count()})
|
||||
except Exception:
|
||||
logger.exception("列出集合失败")
|
||||
for coll in self.db.list_collections():
|
||||
result.append({"name": coll.name, "count": coll.count()})
|
||||
return result
|
||||
|
||||
def is_healthy(self) -> dict:
|
||||
|
||||
Reference in New Issue
Block a user