Files
slide/decks/gen2D/pages/async-task.md
T
wonder d479504f12
Deploy Slides / build-and-deploy (push) Successful in 1m32s
feat: restructure gen2D deck with enriched content and frankfurt theme components
- Restructure from 12 slides to 21 slides with proper section navigation
- Split into pages/ for modular maintenance (15 page files)
- Use frankfurt theme: cover layout, Item component, section frontmatter
- Remove all two-cols layouts to avoid rendering issues
- Add rich content from tmp/ docs: Eino pipeline, prompt agent, async tasks, data model, deployment
- Use Item component for structured content blocks
- Add mermaid ER diagram for data model
- Add Go code block for pipeline type definitions
2026-05-30 14:22:50 +08:00

35 lines
1.0 KiB
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.
# 异步任务模型
提交即返回,后台并发执行
<Item title="📤 任务提交流程">
1. 用户提交生成请求 → 创建 Task 记录(状态 `running`)
2. 立即返回 `taskId`,前端开始轮询 / 建立 WebSocket
3. 后台启动 goroutine 执行管线
</Item>
<Item title="🔄 管线执行与进度推送">
| 阶段 | 进度范围 | 说明 |
|------|---------|------|
| PromptOptimizer | 5% → 25% | 风格合并 + LLM 优化 |
| AssetGenerator | 25% → 60% | 调用文生图 API |
| QualitySupervisor | 60% → 80% | 视觉模型质检 |
| FormatAdapter | 80% → 100% | 格式组装 + 上传 |
</Item>
<Item title="🔁 重试策略">
- **质检重试**(管线内):QualitySupervisor 不合格 → 回退 PromptOptimizer,最多 3 次
- **任务级重试**(管线外):整个管线失败 → 5 秒间隔重试,最多 1 次
- **降级兜底**:超过重试次数后,使用当前最优结果输出
</Item>
<div class="mt-4 text-sm text-gray-400">
任务生命周期:running → completed / failed
</div>