mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 01:10:23 +08:00
fix: Hub 连接清理顺序修复、OAuth 类型常量提取、disassociate 逻辑优化
- Hub proxy/worker 连接关闭时先 unregister 再延迟 abort writer,确保缓冲消息排空 - 提取 OAUTH_AUTH_TYPES 常量,替代各处硬编码的 OAuth 类型列表 - auto-disassociate 跳过 OAuth Key,避免其动态 allowed_models 干扰判定 - 删除 Key 时传入 skip_disassociate=True,跳过不必要的解关联检查 - ModelMapper 缓存命中时将 ORM 实例脱离 Session,修复 DetachedInstanceError
This commit is contained in:
@@ -202,7 +202,7 @@ def test_clear_oauth_invalid_response_invalidates_caches(
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_run_delete_key_side_effects_not_skip_disassociate(
|
||||
async def test_run_delete_key_side_effects_skip_disassociate(
|
||||
monkeypatch: pytest.MonkeyPatch,
|
||||
) -> None:
|
||||
captured: dict[str, Any] = {}
|
||||
@@ -225,4 +225,4 @@ async def test_run_delete_key_side_effects_not_skip_disassociate(
|
||||
)
|
||||
|
||||
assert captured["provider_id"] == "provider-1"
|
||||
assert "skip_disassociate" not in captured
|
||||
assert captured["skip_disassociate"] is True
|
||||
|
||||
Reference in New Issue
Block a user