feat(设备端): 每 5 秒账号巡检 + 打码名按账号库还原

- 后台线程每 5s 并行探测所有在线设备,账号变化才广播下发
- resolve_masked_name:锋哥苏***探访 → 账号库唯一匹配的完整昵称
- /api/device/agent/account 同一套还原(平台/手机手动切号都覆盖)
- 多匹配用上次完整名 tiebreak,分不清不猜
- ACCOUNT_WATCH=0 可关闭;测试/文档同步
This commit is contained in:
2026-10-19 13:13:31 +08:00
parent d399dbd979
commit 0a3920d97d
7 changed files with 156 additions and 15 deletions
+4
View File
@@ -125,6 +125,10 @@ from core import video_plan
video_plan.init_app(app)
from core import account_folder
account_folder.init_app(app) # 流水线:后台线程跑一轮时要自推 app context
# 账号巡检:每 5 秒检测所有在线设备的当前抖音账号,变了就广播下发给设备端
# (平台切号 / 手机手动切号都覆盖;ACCOUNT_WATCH=0 可关)
from core import account_probe
account_probe.start_account_watch(interval=5.0)
from core import plan as _plan_mod
_plan_mod.init_app(app) # 计划调度:同一个套路(后台线程/收尾回调要自推 context)
from core import action_ref