Files
nexus/wiki/concepts/批次任务.md
2026-04-17 23:18:07 +08:00

26 lines
794 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.
---
title: "批次任务"
type: concept
tags: []
---
## 定义
将大规模任务拆分为多个可管理的子任务,按顺序或并行执行的策略。
## 应用场景
- 大量文件处理28 万张照片分 8 批次执行
- 数据处理:大批量数据分批导入
- API 调用:避免 rate limit 的请求分批
## 优势
- **可观测性**:每批次完成后可检查结果
- **容错性**:单批次失败不影响其他批次
- **资源控制**:避免一次性占用过多系统资源
## 执行模式
- **顺序执行**:按批次顺序逐一执行
- **定时执行**:每批次在特定时间(如凌晨)自动运行
## 与相关概念的关系
- [[Cron 任务]] → 批次任务的定时触发机制
- [[精确去重]] → 批次任务的典型应用场景之一