修复(登录任务): 取码失败自动换渠道,被跳过账号也落日志

- 登录先用人工设置的默认接口(当前 iframe):等码超时/发信失败后,
  同一账号自动切到另一条通道(iframe <-> wgapi)再试一轮,每个账号
  最多切一次;DOUYU_LOGIN_EMAIL_FALLBACK_API=off 可关闭
- 步骤 4/5 日志写明当前取码通道,切渠道时单独告警,页面可直接看到
- 配额/账号上限挡下的账号不再「凭空消失」:落一行 skipped 任务,
  日志写明未执行原因;界面新增「已跳过」状态、筛选与重试
- 停止、服务重启收敛、执行线程异常这几条路径也补单账号日志
- 修复刷新线程与收尾写库的覆盖竞态(旧快照会吃掉最后的失败原因)
- 补测试:渠道回退、跳过行与日志、日志真正落库
This commit is contained in:
yml
2026-11-25 19:04:38 +08:00
parent 5efe6b6949
commit 5dec234e3e
10 changed files with 732 additions and 60 deletions
+8 -2
View File
@@ -21,6 +21,7 @@ const STATUS_COLORS: Record<string, string> = {
success: 'success',
failed: 'error',
error: 'error',
skipped: 'warning',
account_cancelled: 'error',
password_wrong: 'error',
account_unverified: 'warning',
@@ -34,6 +35,7 @@ const STATUS_LABELS: Record<string, string> = {
success: '成功',
failed: '失败',
error: '异常',
skipped: '已跳过',
account_cancelled: '账号已注销',
password_wrong: '账号密码错误',
account_unverified: '账号未认证',
@@ -394,7 +396,10 @@ export default function LoginTasksPage() {
mode,
});
setBatchId(result.batch_id);
message.success(`已创建${mode === 'check' ? '检测' : '登录'}任务,共 ${result.count} 个账号`);
message.success(
`已创建${mode === 'check' ? '检测' : '登录'}任务,共 ${result.count} 个账号;` +
'被配额/账号限制挡下的会显示「已跳过」并写明原因',
);
} catch (e: unknown) {
message.error(getErrorMessage(e));
} finally {
@@ -692,7 +697,7 @@ export default function LoginTasksPage() {
>
日志
</Button>
{['failed', 'error'].includes(record.status) && (
{['failed', 'error', 'skipped'].includes(record.status) && (
<Button
type="link"
size="small"
@@ -904,6 +909,7 @@ export default function LoginTasksPage() {
options={[
{ value: 'success', label: '成功' },
{ value: 'failed', label: '失败' },
{ value: 'skipped', label: '已跳过' },
{ value: 'pending', label: '等待中' },
{ value: 'running', label: '进行中' },
{ value: 'stopped', label: '已停止' },