M2b:删除旧 chat 体系——线性会话/叩心/情绪/纪念日模型与页面退役(迁移 003 双向验证),runs 去会话外键,测试全量修剪
This commit is contained in:
1 parent
5f36e3785c
commit
ad9c9e942a
22 files changed
+424
-427
No files matched your search
@@ -74,16 +74,6 @@ async def reset_database() -> AsyncGenerator[None, None]:
|
||||
from app.services.ai_provider_admin import set_endpoint_overrides_cache
|
||||
|
||||
set_endpoint_overrides_cache([])
|
||||
# 清理可能被前序 TestClient 启动的 KnockingPivot 后台任务,避免写锁冲突
|
||||
from app.main import app as _app
|
||||
|
||||
pivot = getattr(_app.state, "knocking_pivot", None)
|
||||
if pivot is not None:
|
||||
try: # noqa: SIM105 — pivot.stop() 是协程,contextlib.suppress 不适用
|
||||
await pivot.stop()
|
||||
except Exception:
|
||||
pass
|
||||
_app.state.__dict__.pop("knocking_pivot", None)
|
||||
yield
|
||||
_assert_test_database_url(str(_engine.url))
|
||||
async with _engine.begin() as conn:
|
||||
|
||||
Reference in new issue
Block a user