fix(accounts): 完善手机号必绑与账号注销等登录异常分型识别
- 补充必须绑定手机号与账号注销/封禁/冻结等错误文案的识别规则 - 增加数据修正迁移 20261008_0052,回写历史账号和登录任务的失败分型 - 增加列表查询与导出时根据错误文案自动兜底细化 failure_kind 的逻辑 - 增加并完善相关分型单元测试
This commit is contained in:
@@ -50,13 +50,26 @@ def classify_failure(message: str | None) -> str:
|
||||
return "must_bind_mobile"
|
||||
if "上限" in text or "配额" in text:
|
||||
return "email_quota"
|
||||
if "极验" in text or "验证" in text and "滑块" in text:
|
||||
if "极验" in text or ("验证" in text and "滑块" in text):
|
||||
return "captcha"
|
||||
if "验证码" in text:
|
||||
if "验证码" in text or "取码" in text:
|
||||
return "email_code"
|
||||
if "中断" in text or "已停止" in text or "任务已停止" in text:
|
||||
return "interrupted"
|
||||
if "密码" in text or "账号不存在" in text or "缺少密码或邮箱" in text:
|
||||
if any(
|
||||
k in text
|
||||
for k in (
|
||||
"密码",
|
||||
"账号不存在",
|
||||
"缺少密码或邮箱",
|
||||
"注销",
|
||||
"已注销",
|
||||
"封禁",
|
||||
"冻结",
|
||||
"限制登录",
|
||||
"禁止登录",
|
||||
)
|
||||
):
|
||||
return "credential"
|
||||
# 请求失败/超时/连接异常,以及未知文案:都按可重试处理。
|
||||
# 宁可多给一次机会(有每日上限兜底),也不要把可能只是抖动的账号推给人工。
|
||||
|
||||
Reference in New Issue
Block a user