fc-common: add failed paths cache infrastructure
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I35f9bfb044160151cf73c43ed9ada3476a6a6964
This commit is contained in:
parent
4c56b192f0
commit
65a6fd853d
5 changed files with 105 additions and 9 deletions
|
|
@ -79,6 +79,14 @@ pub struct QueueRunnerConfig {
|
|||
/// retrying.
|
||||
#[serde(default)]
|
||||
pub strict_errors: bool,
|
||||
|
||||
/// Cache failed derivation paths to skip known-failing builds.
|
||||
#[serde(default = "default_true")]
|
||||
pub failed_paths_cache: bool,
|
||||
|
||||
/// TTL in seconds for failed paths cache entries (default 24h).
|
||||
#[serde(default = "default_failed_paths_ttl")]
|
||||
pub failed_paths_ttl: u64,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
|
|
@ -405,6 +413,10 @@ const fn default_true() -> bool {
|
|||
true
|
||||
}
|
||||
|
||||
const fn default_failed_paths_ttl() -> u64 {
|
||||
86400
|
||||
}
|
||||
|
||||
const fn default_check_interval() -> i32 {
|
||||
60
|
||||
}
|
||||
|
|
@ -521,11 +533,13 @@ impl Default for EvaluatorConfig {
|
|||
impl Default for QueueRunnerConfig {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
workers: 4,
|
||||
poll_interval: 5,
|
||||
build_timeout: 3600,
|
||||
work_dir: PathBuf::from("/tmp/fc-queue-runner"),
|
||||
strict_errors: false,
|
||||
workers: 4,
|
||||
poll_interval: 5,
|
||||
build_timeout: 3600,
|
||||
work_dir: PathBuf::from("/tmp/fc-queue-runner"),
|
||||
strict_errors: false,
|
||||
failed_paths_cache: true,
|
||||
failed_paths_ttl: 86400,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue