阶段1: 调度/生命周期切换 device_pool——task_manager 设备解析与状态查询、STFDevice 去 occupy/release、web_server 端点换数据源(USB 桥接保留到阶段 2)

This commit is contained in:
2026-08-17 11:16:13 +08:00
parent 52c4d3aab4
commit 5354fe6379
5 changed files with 117 additions and 200 deletions
+2 -2
View File
@@ -90,8 +90,8 @@ STF 当前仅提供:occupy/release 互斥、present+ready 健康信号、设
|---|---|---|
| `task_manager.resolve_serials` (145-183) | `stf.list_free_devices()` / `list_all_devices()` | `device_pool.list_ready()`;preempt 模式 = 全部 list_online |
| `resolve_serials` skip_offline 过滤 (166-183) | STF present/ready 判定 | `device_pool.is_online()`;跳过原因文案"离线/未连接" |
| `device_worker.STFDevice.acquire` (45-70) | `stf.occupy()` + 直连/桥接 | 去掉 occupy 与桥接分支(IP:port 直连保留,USB 序列号仅提示不支持);保留 adb_connect 重试 + 2s 等待 |
| `STFDevice.release` (78-93) | `stf.release()` | 置空(互斥由 `_running[serial]` 负责,本来就是内存锁) |
| `device_worker.STFDevice.acquire` (45-70) | `stf.occupy()` + 直连/桥接 | 去掉 occupy(互斥由 `_running[serial]` 负责);**USB 桥接保留到阶段 2**(避免迁移期 USB 断档,阶段 2 换成 220 adb server);保留 adb_connect 重试 + 2s 等待 |
| `STFDevice.release` (78-93) | `stf.release()` | 置空(仅保留 USB 隧道断开) |
| `STFDevice._pick_free` (72-76) | `list_free_devices` | `device_pool.list_ready()` |
| `_ForegroundScanner` (234-386) | `list_all_devices` / `list_my_devices` / remote_connect | `device_pool.list_online()`;桥接分支删除 |
| `web_server.api_device_screen_all` (646) | STF present 列表 | `device_pool.list_online()` |