circus/crates
NotAShelf f8586a7f3c
fc-queue-runner: implement per-build cancellation via CancellationToken
Adds an `ActiveBuild` registry (DashMap of `<Uuid, CancellationToken>`)
to `WorkerPool` and get `dispatch()` to create a per-build token to race
`run_build` against it via Tokio's `select!`.

The `cancel_checker_loop` then polls the DB every N seconds (currently 2)
for builds cancelled while running, and triggers their tokens.

Existing `kill_on_drop(true) on `nix build` processes handles
subprocess cleanup when the future is dropped. Thank you past me for
your insight.

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: Ic8af58e92972c7d5d104d9c717e9217d6a6a6964
2026-02-16 23:42:45 +03:00
..
common fc-common: add get_cancelled_among query for cancel-checker polling 2026-02-16 23:42:44 +03:00
evaluator fc-evaulator: allow fail-fast behaviour 2026-02-16 23:42:39 +03:00
migrate-cli various: remove unused imports and parameters; fix clippy lints 2026-02-05 22:45:23 +03:00
queue-runner fc-queue-runner: implement per-build cancellation via CancellationToken 2026-02-16 23:42:45 +03:00
server treewide: replace BuildStatus::Completed with BuildStatus::Succeeded 2026-02-16 23:42:21 +03:00