Skip to main content

cmd_work

Function cmd_work 

Source
pub async fn cmd_work(
    repo: PathBuf,
    once: bool,
    expected: Option<String>,
) -> Result<i32>
Expand description

kranz work [--once]: the dispatcher. Drains the per-repo queue one mission at a time; --once processes exactly one front entry (or exits if the repo is busy). Per-repo serialization is enforced by is_repo_busy.

Thin wrapper over kranz_engine::work::drain_queue (roadmap f-1-1): the core loop lives in the engine so any surface can drive it headlessly; this wrapper keeps the CLI-only concerns — operator checkout capture/restore, live progress printing, and tailing each mission’s events to stderr via [run_mission_loop].