看图时发现两个问题: 一、页面上那段说明是 P1a 时代的文案,已经过时且误导:「重登仍由人工在 「CK 检测与重登」页面操作」——P1b 上线后自动重登已存在。两个作业其实是联动的 上下游:巡检把账号标成 invalid,「CK 自动重登」的候选条件正是这个字段,所以 巡检一发现失效、重登作业下一周期就会接手。刻意分成两个作业是为了止损粒度 (巡检只读零风险;重登会真实登录,出问题可单独关掉)。据此改写说明文案,并在 两张卡片上标出「下游:CK 自动重登」/「上游:巡检标记为失效且有 CK 的账号」。 二、jobs 接口新增 pending_relogin:当前有多少条正等着自动重登。页面靠它把 上下游关系显性化 —— 没有这个数字,两个开关看起来像互不相干。计数走重登作业 自己的候选查询,保证「页面显示的待办」和「作业实际会捞的」是同一口径。 顺带修掉 tests/test_douyu_email_code_pick.py 里一条既有缺陷:它用 max(0, now.minute - 30) 构造「30 分钟前的邮件」,分钟数小于 30 时会退化成当前 整点(21:00:12 → "今天 21:00"),只比 now 早十几秒,于是断言随「当前几点」偶发 失败 —— 每小时前 30 分钟必红(已确认在我本次所有改动之前的提交上同样失败, 不是本次引入)。改成真实的时间减法,跨天时用「昨天」。 全量 298 通过。提交时另一路 SQLite→MySQL 的测试改造仍在同一工作区进行, 本次只暂存本功能相关文件。
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:
- @vitejs/plugin-react uses Oxc
- @vitejs/plugin-react-swc uses SWC
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...
},
},
])