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

1.0 KiB
Raw Blame History

异步任务模型

提交即返回,后台并发执行

  1. 用户提交生成请求 → 创建 Task 记录(状态 running)
  2. 立即返回 taskId,前端开始轮询 / 建立 WebSocket
  3. 后台启动 goroutine 执行管线
阶段 进度范围 说明
PromptOptimizer 5% → 25% 风格合并 + LLM 优化
AssetGenerator 25% → 60% 调用文生图 API
QualitySupervisor 60% → 80% 视觉模型质检
FormatAdapter 80% → 100% 格式组装 + 上传
  • 质检重试(管线内):QualitySupervisor 不合格 → 回退 PromptOptimizer,最多 3 次
  • 任务级重试(管线外):整个管线失败 → 5 秒间隔重试,最多 1 次
  • 降级兜底:超过重试次数后,使用当前最优结果输出
任务生命周期:running → completed / failed