feat(资产管理): 账号状态列 + 任务变量回写;通用任务 App 回退

- device_account 新增 account_status(schema v21),资产表可手改
- 任务「读取文字」var=account_status 自动回写当前账号;元素不存在=正常
- 计划:任务段没有 open_app 时回退到唯一 App(创作者中心这类通用任务)
- 测试/文档同步
This commit is contained in:
2026-10-18 16:13:03 +08:00
parent 6c1f241a16
commit f3075df683
11 changed files with 175 additions and 3 deletions
+4
View File
@@ -317,6 +317,10 @@ def api_af_roster_update(row_id):
row.device_name = dev[:80]
if "douyin_id" in data:
row.douyin_id = (data.get("douyin_id") or "").strip()[:64]
if "account_status" in data:
# 账号状态:手改(正常/账号异常/限流…);任务里「读取文字」写
# 变量 account_status 时也会走同一列(见 af.set_account_status)
row.account_status = (data.get("account_status") or "").strip()[:80]
row.updated_at = time.strftime("%Y-%m-%d %H:%M:%S")
db.session.commit()
_log.info("账号库编辑:%s → 昵称 %s / 设备 %s", row_id, row.nickname, row.device_name)