summaryrefslogtreecommitdiffstats
path: root/src/pipeline
diff options
context:
space:
mode:
authoraur-build <aur-build@localhost>2026-11-23 13:44:20 +0000
committeraur-build <aur-build@localhost>2026-11-23 13:44:20 +0000
commit4c143e969dcd7b6a18e5a86f9a754c9b62979ccf (patch)
treec61c2274e3810669cef8319cf9980cbbe031f840 /src/pipeline
parent053dfbca8a4955a616e9b2c0f5a5d664c0db7aef (diff)
downloadaur-build-4c143e969dcd7b6a18e5a86f9a754c9b62979ccf.tar.gz
aur-build-4c143e969dcd7b6a18e5a86f9a754c9b62979ccf.zip
usecase,http,pipeline,ops: keep the contract, drop the argument
A workflow's doc now says what it guarantees and stops defending its existence: `subscribe` resolves the repo row, `approve` queues what the approval buys, a per-item failure comes back as a value instead of a panic. The history of which front end used to open-code it is gone. The last census-war notes go with it — three places that explained why a name in a test string was not a caller.
Diffstat (limited to 'src/pipeline')
-rw-r--r--src/pipeline/dispatch.rs15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/pipeline/dispatch.rs b/src/pipeline/dispatch.rs
index ad2d627..13590ae 100644
--- a/src/pipeline/dispatch.rs
+++ b/src/pipeline/dispatch.rs
@@ -9,9 +9,7 @@ use crate::db::{self, builds, Db};
use crate::pipeline::{self, Outcome};
pub struct Pool {
- // Read only by `shutdown`, which is compiled for the test tier: a release
- // build starts the dispatcher and runs it until the process exits, so in
- // that build these two fields are stored and never read.
+ // Read only by `shutdown`; a release build runs the pool until exit.
#[cfg_attr(not(feature = "test-support"), allow(dead_code))]
stop: Arc<AtomicBool>,
#[cfg_attr(not(feature = "test-support"), allow(dead_code))]
@@ -50,11 +48,8 @@ impl Pool {
Pool { stop, handles }
}
- /// Stop the dispatcher threads and join them.
- ///
- /// Production runs the pool until the process exits; nothing asks it to
- /// stop. A test needs the join, because it asserts on the pool's effects
- /// and cannot do that while the threads are still running.
+ /// Stop the dispatcher threads and join them, so a test can assert on the
+ /// pool's effects.
#[cfg(feature = "test-support")]
pub fn shutdown(self) {
self.stop.store(true, Ordering::SeqCst);
@@ -110,7 +105,7 @@ fn dispatch_once_impl(cfg: &Config, db: &Db, tx: &Sender<String>) -> Vec<String>
ids
}
-/// Production reaches this through `dispatch_once`, which is the only thing that acts on the answer.
+/// Reached only through `dispatch_once`.
#[cfg(feature = "test-support")]
pub fn admissible(cfg: &Config, db: &Db) -> usize {
admissible_impl(cfg, db)
@@ -134,7 +129,7 @@ fn admissible_impl(cfg: &Config, db: &Db) -> usize {
slots
}
-/// Production reaches this through `admissible`, which is the only thing that acts on the number.
+/// Reached only through `admissible`.
#[cfg(feature = "test-support")]
pub fn free_disk_mb(path: &std::path::Path) -> u64 {
free_disk_mb_impl(path)