Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eab7225d83 | ||
|
|
0159fdf149 |
@@ -172,7 +172,6 @@ class MemoryConfigRepository:
|
|||||||
if not memory_config:
|
if not memory_config:
|
||||||
raise RuntimeError("reflection config not found")
|
raise RuntimeError("reflection config not found")
|
||||||
return memory_config
|
return memory_config
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def query_reflection_config_by_workspace_id(db: Session, workspace_id: uuid.UUID) -> MemoryConfig:
|
def query_reflection_config_by_workspace_id(db: Session, workspace_id: uuid.UUID) -> MemoryConfig:
|
||||||
"""构建查询所有配置的语句(SQLAlchemy text() 命名参数)
|
"""构建查询所有配置的语句(SQLAlchemy text() 命名参数)
|
||||||
@@ -528,7 +527,6 @@ class MemoryConfigRepository:
|
|||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
Optional[tuple]: (MemoryConfig, Workspace) tuple, None if not found
|
Optional[tuple]: (MemoryConfig, Workspace) tuple, None if not found
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
ValueError: Raised when config exists but workspace doesn't
|
ValueError: Raised when config exists but workspace doesn't
|
||||||
"""
|
"""
|
||||||
@@ -555,7 +553,6 @@ class MemoryConfigRepository:
|
|||||||
result = db.query(MemoryConfig, Workspace).join(
|
result = db.query(MemoryConfig, Workspace).join(
|
||||||
Workspace, MemoryConfig.workspace_id == Workspace.id
|
Workspace, MemoryConfig.workspace_id == Workspace.id
|
||||||
).filter(MemoryConfig.config_id == config_id).first()
|
).filter(MemoryConfig.config_id == config_id).first()
|
||||||
|
|
||||||
elapsed_ms = (time.time() - start_time) * 1000
|
elapsed_ms = (time.time() - start_time) * 1000
|
||||||
|
|
||||||
if not result:
|
if not result:
|
||||||
@@ -642,7 +639,6 @@ class MemoryConfigRepository:
|
|||||||
},
|
},
|
||||||
exc_info=True
|
exc_info=True
|
||||||
)
|
)
|
||||||
|
|
||||||
db_logger.error(f"Failed to query memory config and workspace: config_id={config_id} - {str(e)}")
|
db_logger.error(f"Failed to query memory config and workspace: config_id={config_id} - {str(e)}")
|
||||||
raise
|
raise
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user