mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-02 09:20:22 +08:00
refactor: 移除独立 hub/proxy/executor/gateway crate,统一为 gateway tunnel 架构
- 删除 aether-hub、aether-proxy 独立项目及其 Dockerfile/配置 - 删除 crates/aether-executor 和 crates/aether-gateway 全部模块 - 新增 apps/ 目录作为应用入口 - 将 hub 概念重构为 gateway tunnel transport - 将 executor 重构为 execution runtime - 新增 tunnel.rs 合约定义和 testkit tunnel/execution_runtime 模块 - 更新 Python 服务层和测试适配新架构命名
This commit is contained in:
@@ -6,7 +6,7 @@ import pytest
|
||||
|
||||
from src.core.api_format.conversion.internal_video import InternalVideoPollResult, VideoStatus
|
||||
from src.models.database import VideoTask
|
||||
from src.services.request.rust_executor_client import RustExecutorSyncResult
|
||||
from src.services.request.execution_runtime_client import ExecutionRuntimeSyncResult
|
||||
from src.services.task.video.poller_adapter import VideoPollContext, VideoTaskPollerAdapter
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ async def test_update_task_after_poll_skips_terminal_cancelled_task(
|
||||
async def test_video_poller_try_rust_payload_passes_proxy_snapshot(
|
||||
monkeypatch: pytest.MonkeyPatch,
|
||||
) -> None:
|
||||
from src.services.request import rust_executor_client as rust_mod
|
||||
from src.services.request import execution_runtime_client as runtime_mod
|
||||
from src.services.task.video import poller_adapter as mod
|
||||
|
||||
adapter = VideoTaskPollerAdapter()
|
||||
@@ -90,11 +90,18 @@ async def test_video_poller_try_rust_payload_passes_proxy_snapshot(
|
||||
proxy_snapshot = object()
|
||||
captured: dict[str, object] = {}
|
||||
|
||||
async def _fake_execute_sync_json(self: object, plan: object) -> RustExecutorSyncResult:
|
||||
async def _fake_execute_sync_json(self: object, plan: object) -> ExecutionRuntimeSyncResult:
|
||||
captured["plan"] = plan
|
||||
return RustExecutorSyncResult(status_code=200, response_json={"id": "op_1", "done": False})
|
||||
return ExecutionRuntimeSyncResult(
|
||||
status_code=200,
|
||||
response_json={"id": "op_1", "done": False},
|
||||
)
|
||||
|
||||
monkeypatch.setattr(rust_mod.RustExecutorClient, "execute_sync_json", _fake_execute_sync_json)
|
||||
monkeypatch.setattr(
|
||||
runtime_mod.ExecutionRuntimeClient,
|
||||
"execute_sync_json",
|
||||
_fake_execute_sync_json,
|
||||
)
|
||||
|
||||
ctx = VideoPollContext(
|
||||
task_id="task-1",
|
||||
|
||||
Reference in New Issue
Block a user