Files
live-hub-py/web/frontend
yml 9473645548 修复(斗鱼登录): 邮箱验证码按攒批投递放大等待窗口,取码超时不再重发
生产实测斗鱼验证码邮件是攒批投递的:早高峰延迟 6~20 秒,高峰劣化到 8~13
分钟,同批请求的邮件会在同一分钟内成批到达。抽 40 个「超时」账号核对邮箱,
30 个其实收到了邮件(75%),只是迟到;另有 25% 在批次内根本没投递。

原实现等 60 秒就判超时,并在超时后换通道重试 —— 重试 = 重新发信,把邮件队列
压得更长:每账号发信量从 1.5 封涨到 3.3 封,延迟从 10 秒级恶化到 8~13 分钟,
取码成功率从 100% 掉到 20%。两个通道写的是同一个队列,发两次不会多拿码。

- 等待窗口 60 → 900 秒,新增补等 600 秒(不重发,只等迟到邮件)
- 取码超时不换通道、不整轮重试;只有发信/提交接口报错才切 iframe/wgapi
- 自动重登与接入作业不再对取码失败账号切 iframe 重跑
- 单账号总时长上限 240/300 → 1800 秒,等待接入 deadline 约束
- 文档记录实测机制与判定依据

验证:1727 passed / 6 skipped,前端 tsc -b 通过,pyright 生产代码 0 错误
2026-11-25 19:52:23 +08:00
..
2026-06-22 13:11:15 +08:00
2026-06-22 13:11:15 +08:00
2026-06-22 13:11:15 +08:00
2026-06-22 13:11:15 +08:00
2026-06-22 13:11:15 +08:00
2026-06-22 13:11:15 +08:00

React + TypeScript + Vite

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

React Compiler

The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.

Expanding the ESLint configuration

If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:

export default defineConfig([
  globalIgnores(['dist']),
  {
    files: ['**/*.{ts,tsx}'],
    extends: [
      // Other configs...

      // Remove tseslint.configs.recommended and replace with this
      tseslint.configs.recommendedTypeChecked,
      // Alternatively, use this for stricter rules
      tseslint.configs.strictTypeChecked,
      // Optionally, add this for stylistic rules
      tseslint.configs.stylisticTypeChecked,

      // Other configs...
    ],
    languageOptions: {
      parserOptions: {
        project: ['./tsconfig.node.json', './tsconfig.app.json'],
        tsconfigRootDir: import.meta.dirname,
      },
      // other options...
    },
  },
])

You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:

// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'

export default defineConfig([
  globalIgnores(['dist']),
  {
    files: ['**/*.{ts,tsx}'],
    extends: [
      // Other configs...
      // Enable lint rules for React
      reactX.configs['recommended-typescript'],
      // Enable lint rules for React DOM
      reactDom.configs.recommended,
    ],
    languageOptions: {
      parserOptions: {
        project: ['./tsconfig.node.json', './tsconfig.app.json'],
        tsconfigRootDir: import.meta.dirname,
      },
      // other options...
    },
  },
])