summaryrefslogtreecommitdiffstats
path: root/src/config.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs
index 5bcb5aa..270c81e 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -55,6 +55,19 @@ pub struct Config {
pub publish_fault: Option<String>,
/// Test hook: the named shim must fail, e.g. `makechrootpkg`.
pub shim_fail: Option<String>,
+ /// How many builds may run at once (§8.2 backpressure). Default 1, which
+ /// also means the chroot pool only needs one warm root.
+ pub max_concurrent_builds: usize,
+ /// Seconds of lease a worker takes when it claims a build (§8.2).
+ pub lease_secs: i64,
+ /// A build is not admitted unless at least this much free space remains
+ /// on the filesystem holding `root` (§8.2 disk headroom).
+ pub min_free_disk_mb: u64,
+ /// Transient step failures are retried up to this many attempts; a
+ /// deterministic build failure is never retried (§8.4).
+ pub max_transient_attempts: i64,
+ /// Seconds between dispatcher passes.
+ pub dispatch_tick_secs: u64,
}
impl Default for Config {
@@ -80,6 +93,11 @@ impl Default for Config {
shim_dir: None,
publish_fault: None,
shim_fail: None,
+ max_concurrent_builds: 1,
+ lease_secs: 90,
+ min_free_disk_mb: 1024,
+ max_transient_attempts: 3,
+ dispatch_tick_secs: 2,
}
}
}