Рефакторинг канала управления

This commit is contained in:
2026-02-26 20:26:22 +03:00
parent aee8f7460f
commit 7b5d6d2156
10 changed files with 380 additions and 260 deletions

View File

@@ -54,6 +54,9 @@ def test_action_routes_call_callbacks():
events.append("stop")
return "stop accepted"
async def on_status() -> str:
return "ok"
async def request(port: int, path: str) -> tuple[int, dict[str, str]]:
reader, writer = await asyncio.open_connection("127.0.0.1", port)
writer.write(
@@ -75,10 +78,8 @@ def test_action_routes_call_callbacks():
port=0,
timeout=0.2,
health_provider=provider,
on_start=on_start,
on_stop=on_stop,
)
await server.start()
await server.start(on_start, on_stop, on_status)
try:
port = server.port
assert port > 0