chore(cloud): verify integration change

This commit is contained in:
2026-07-13 08:06:15 +08:00
parent 3c5f5509c2
commit 22d37ca95b
10 changed files with 60 additions and 33 deletions
+1 -2
View File
@@ -65,8 +65,7 @@ class ActiveAssignmentRunner:
asyncio.to_thread(
self.executor.execute,
assignment,
should_stop=lambda: guard.is_lost()
or self._stop_requested.is_set(),
should_stop=lambda: guard.is_lost() or self._stop_requested.is_set(),
)
)
renewal = asyncio.create_task(
+6 -2
View File
@@ -177,7 +177,9 @@ def test_one_host_executes_assignment_through_outbound_protocol(tmp_path) -> Non
async with _control_plane(tmp_path / "one-host.sqlite3", "host-a") as app:
async with _host_client(app, "host-a", request_paths=paths) as client:
await _sync_fake_device(client, "host-a", "device-a")
task_id = app.state.cloud_services.scheduler.submit(goal="open settings")
task_id = app.state.cloud_services.scheduler.submit(
goal="open settings"
)
app.state.cloud_services.scheduler.assign()
assignment = await client.claim()
assert assignment is not None
@@ -287,7 +289,9 @@ def test_host_agent_restart_reuses_active_lease(tmp_path) -> None:
assert (await restarted_client.renew(assignment)).status == "renewed"
await restarted_client.report_result(assignment, status="done")
assert app.state.cloud_services.repository.get_task(task_id).status == "done"
assert (
app.state.cloud_services.repository.get_task(task_id).status == "done"
)
asyncio.run(scenario())