refactor: migrate high-risk write transactions

This commit is contained in:
jxxghp
2026-08-21 20:46:57 +08:00
parent 7de72e0e83
commit b598b516d5
12 changed files with 312 additions and 9 deletions
+4 -1
View File
@@ -307,7 +307,10 @@ def get_agent_chat_service(
db: AsyncSession = Depends(get_async_db),
) -> AgentChatService:
"""组装 Agent 会话历史查询和删除服务。"""
return AgentChatService(repository=_repository("agent_chat", db))
return AgentChatService(
repository=_repository("agent_chat", db),
unit_of_work=_transaction("async", db),
)
def get_mediaserver_query_service(