扫码登录,获取cookies
This commit is contained in:
@@ -122,18 +122,18 @@
|
||||
- **Property 25: 签到日志状态过滤**
|
||||
- **Validates: Requirements 8.1-8.3**
|
||||
|
||||
- [ ] 7. Checkpoint - 确保 API_Service 所有测试通过
|
||||
- [x] 7. Checkpoint - 确保 API_Service 所有测试通过
|
||||
- 运行所有测试,确认账号管理、任务配置、日志查询功能正常
|
||||
- 如有问题请向用户确认
|
||||
|
||||
- [ ] 8. 重构 Task_Scheduler(真实数据库交互)
|
||||
- [ ] 8.1 重构 Task_Scheduler 使用 shared 模块
|
||||
- [x] 8. 重构 Task_Scheduler(真实数据库交互)
|
||||
- [x] 8.1 重构 Task_Scheduler 使用 shared 模块
|
||||
- 修改 `task_scheduler/app/celery_app.py` 导入 shared models
|
||||
- 实现 `load_scheduled_tasks()`:从 DB 查询 `is_enabled=True` 的 Task,动态注册到 Celery Beat
|
||||
- 实现 Redis pub/sub 监听:接收任务变更通知,动态更新调度
|
||||
- 替换 `signin_tasks.py` 中的 mock 账号列表为真实 DB 查询
|
||||
- _Requirements: 5.1, 5.2, 5.3_
|
||||
- [ ] 8.2 实现分布式锁和重试机制
|
||||
- [x] 8.2 实现分布式锁和重试机制
|
||||
- 使用 Redis SETNX 实现分布式锁,防止同一任务重复调度
|
||||
- 配置 Celery 任务重试:`max_retries=3`、`default_retry_delay=60`
|
||||
- _Requirements: 5.4, 5.5_
|
||||
@@ -142,14 +142,14 @@
|
||||
- **Property 18: 分布式锁防重复调度**
|
||||
- **Validates: Requirements 5.1, 5.5**
|
||||
|
||||
- [ ] 9. 重构 Signin_Executor(真实数据库交互)
|
||||
- [ ] 9.1 重构 Signin_Executor 使用 shared 模块
|
||||
- [x] 9. 重构 Signin_Executor(真实数据库交互)
|
||||
- [x] 9.1 重构 Signin_Executor 使用 shared 模块
|
||||
- 修改 `signin_service.py` 中的 `_get_account_info()` 从 DB 查询真实 Account 数据
|
||||
- 修改 `weibo_client.py` 中的 `_decrypt_cookies()` 使用 `shared/crypto.py`
|
||||
- 实现签到结果写入 `signin_logs` 表(替代 mock)
|
||||
- 实现 Cookie 失效时更新 `account.status = "invalid_cookie"`
|
||||
- _Requirements: 6.1, 6.2, 6.4, 6.5_
|
||||
- [ ] 9.2 实现反爬虫防护模块
|
||||
- [x] 9.2 实现反爬虫防护模块
|
||||
- 实现随机延迟函数:返回 `[min, max]` 范围内的随机值
|
||||
- 实现 User-Agent 轮换:从预定义列表中随机选择
|
||||
- 实现代理池集成:调用 proxy pool 服务获取代理,不可用时降级为直连
|
||||
@@ -161,12 +161,12 @@
|
||||
- **Property 22: User-Agent 来源**
|
||||
- **Validates: Requirements 6.1, 6.4, 6.5, 7.1, 7.2**
|
||||
|
||||
- [ ] 10. 更新 Dockerfile 和集成配置
|
||||
- [ ] 10.1 更新 `backend/Dockerfile`
|
||||
- [x] 10. 更新 Dockerfile 和集成配置
|
||||
- [x] 10.1 更新 `backend/Dockerfile`
|
||||
- 在每个构建阶段添加 `COPY shared/ ./shared/`
|
||||
- 确保 shared 模块在所有服务容器中可用
|
||||
- _Requirements: 10.1, 10.3_
|
||||
- [ ] 10.2 更新 `backend/requirements.txt`
|
||||
- [x] 10.2 更新 `backend/requirements.txt`
|
||||
- 添加 `croniter`(Cron 表达式解析)
|
||||
- 添加 `hypothesis`(属性测试)
|
||||
- 添加 `pytest`、`pytest-asyncio`(测试框架)
|
||||
|
||||
Reference in New Issue
Block a user