From c2e00d130cfa6294105415d8c5b03c4dcc7da988 Mon Sep 17 00:00:00 2001 From: Apoorv Sadana <95699312+apoorvsadana@users.noreply.github.com> Date: Tue, 10 Dec 2024 22:18:28 +0530 Subject: [PATCH] fix worker enabled check (#187) * fix worker enabled check --------- Co-authored-by: Heemank Verma --- CHANGELOG.md | 1 + crates/orchestrator/src/workers/mod.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 061aad6b..c434fd1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -81,6 +81,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). ## Fixed +- `is_worker_enabled` status check moved from `VerificationFailed` to `Failed` - refactor: static attributes for telemetry - refactor: aws setup for Event Bridge - refactor: RUST_LOG filtering support diff --git a/crates/orchestrator/src/workers/mod.rs b/crates/orchestrator/src/workers/mod.rs index 1a909a8b..ec61659a 100644 --- a/crates/orchestrator/src/workers/mod.rs +++ b/crates/orchestrator/src/workers/mod.rs @@ -49,7 +49,7 @@ pub trait Worker: Send + Sync { async fn is_worker_enabled(&self, config: Arc) -> color_eyre::Result { let failed_jobs = config .database() - .get_jobs_by_statuses(vec![JobStatus::VerificationFailed, JobStatus::VerificationTimeout], Some(1)) + .get_jobs_by_statuses(vec![JobStatus::Failed, JobStatus::VerificationTimeout], Some(1)) .await?; if !failed_jobs.is_empty() {