Files
cms-website/docs/adr/ADR-003-Job进程内Runner.md
T
浅念 07483b5ae2 docs: ADR 001–015 落档 + README
Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-10-20 20:56:26 +08:00

7 lines
589 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ADR-003:Job 执行 = 进程内 Runner + 数据库 Job 状态
- **状态**:已采纳(spec §3,阶段 0)
- **决策**:导入/构建 Job 由进程内 Runner 执行,状态持久化在数据库(import_jobs/build_jobs 表),不引入 BullMQ 等外部队列。
- **理由**:单机单进程已满足切片吞吐;状态落库使进程中断后可识别 stale Job 并恢复/标记失败,不依赖外部组件。
- **权衡**:无分布式并行能力;若未来需要横向扩展须引入真正的队列——但 Job 表结构已按状态机设计,迁移成本低。