fc-evaulator: allow fail-fast behaviour

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I1da41766f1c499347279c41f2316f4376a6a6964
This commit is contained in:
raf 2026-02-16 21:05:12 +03:00
commit 235c9834b7
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
5 changed files with 30 additions and 134 deletions

View file

@ -14,6 +14,7 @@ pub async fn run(
worker_pool: Arc<WorkerPool>,
poll_interval: Duration,
wakeup: Arc<Notify>,
strict_errors: bool,
) -> anyhow::Result<()> {
// Reset orphaned builds from previous crashes (older than 5 minutes)
match repo::builds::reset_orphaned(&pool, 300).await {
@ -184,6 +185,9 @@ pub async fn run(
}
},
Err(e) => {
if strict_errors {
return Err(anyhow::anyhow!("Failed to fetch pending builds: {e}"));
}
tracing::error!("Failed to fetch pending builds: {e}");
},
}