国 际
基于队列的工作流程执行的命令行界面.
安装
bun install
捆绑二进制
CLI 可以编译为独立的二进制 :
bun run build:current # Build for current platform
bun run build # Build for all platforms
运行时间要求 : 当使用捆绑的二进制时, bun 必须在系统上安装工作流程步骤执行。 这是因为工作流程步骤是TypeScript文件,需要在运行时被转录和执行.
# Example Dockerfile
FROM oven/bun:1.2 AS runner
# bun is available from the base image
图标
工人
cf worker start [--mode unified|executor|scheduler] [--concurrency n] [--workflows-dir path]
提交和管理( M)
cf submit <workflow> [--input '{}' | --input-file path] [--priority n] [--timeout ms]
cf status <runId>
cf cancel <runId> [--reason text]
cf retry <runId> [--reason text]
工作流程( R)
cf workflows list
cf runs list [--workflow slug] [--status pending|running|completed|failed] [--all]
工人模式
- 统一 (默认) - 所有循环在一个过程中
- 执行者 - 只执行步骤(需要单独的调度器)
- 调度器 - 只安排步骤(需要单独的执行者)
超时
三级倒计时 :
- 步骤级别 :
defineStep({ timeoutMs }) - 提交级别 :
--timeout旗帜 - 系统默认: 300 000 ms (5分钟)
螺旋阈值 : --stale-threshold (默认30s) - 探测到工人通过心跳缺失坠毁
实例
# Start worker
cf worker start --concurrency 5 # Terminal 1
# Submit and manage workflows
cf submit my-workflow --input '{}' --timeout 60000 # Terminal 2
cf status <runId>
# Scaled deployment
cf worker start --mode scheduler # Terminal 1
cf worker start --mode executor --concurrency 10 # Terminal 2-4 (multiple)