Files
model-platform/schedule
27d5dfaeb8 refactor(schedule): extract execution/ + runners in layered refactor (stage 4)
- Move worker.py -> execution/worker.py, executor.py -> execution/executor.py
  (byte-identical copies; import sites updated)
- Merge old execution.py + notebook_runner.py into
  execution/runners/notebook.py: subprocess CLI (main/emit_outputs) plus the
  in-process helpers (_execute_notebook/_execute_python/execute_artifact)
- schedule/notebook_runner.py becomes a compatibility shim so
  `python -m schedule.notebook_runner` (the worker's stable -m string) still works
- Delete flat execution.py (shadowed by the new execution/ package)
- Zero behavior change; schedule/pyproject.toml untouched

Co-Authored-By: Claude <noreply@anthropic.com>
2026-09-02 10:10:41 +08:00
..
2026-08-17 15:59:19 +08:00
2026-08-20 10:26:44 +08:00

Schedule Executor

独立调度执行服务,内置 APScheduler。

  • Cron 任务持久化到 MySQL 的 apscheduler_jobs 表;
  • FastAPI Backend 创建运行记录和 Outbox 事件后,通过 HTTP 尝试立即推送;
  • HTTP 推送失败时,Executor 继续轮询 MySQL outbox_events,保证任务不会丢失;
  • Executor 负责 DAG 节点派发、稳定版本执行、重试、状态推进和结果回写;
  • 不依赖 Redis,MySQL 是调度状态与幂等状态的唯一权威。