diff --git a/crates/orchestrator/src/database/mongodb/mod.rs b/crates/orchestrator/src/database/mongodb/mod.rs index 2d98a5ea..c3aeff49 100644 --- a/crates/orchestrator/src/database/mongodb/mod.rs +++ b/crates/orchestrator/src/database/mongodb/mod.rs @@ -432,7 +432,7 @@ impl Database for MongoDb { "status": { "$in": job_status.iter().map(|status| bson::to_bson(status).unwrap_or(Bson::Null)).collect::>() }, - "metadata.orchestrator_unique_id": orchestrator_id.clone() + "metadata.orchestrator_service_id": orchestrator_id.clone() }; let find_options = limit.map(|val| FindOptions::builder().limit(Some(val)).build()); diff --git a/crates/orchestrator/src/jobs/constants.rs b/crates/orchestrator/src/jobs/constants.rs index 6f3de6d4..bd135597 100644 --- a/crates/orchestrator/src/jobs/constants.rs +++ b/crates/orchestrator/src/jobs/constants.rs @@ -11,4 +11,4 @@ pub const JOB_METADATA_SNOS_FACT: &str = "snos_fact"; pub const JOB_METADATA_FAILURE_REASON: &str = "failure_reason"; pub const JOB_METADATA_ERROR: &str = "error"; pub const JOB_METADATA_PROCESSING_COMPLETED_AT: &str = "processing_completed_at"; -pub const JOB_METADATA_ORCHESTRATOR_UNIQUE_ID: &str = "orchestrator_unique_id"; +pub const JOB_METADATA_ORCHESTRATOR_SERVICE_ID: &str = "orchestrator_service_id"; diff --git a/crates/orchestrator/src/jobs/mod.rs b/crates/orchestrator/src/jobs/mod.rs index 0031b330..e33c2e88 100644 --- a/crates/orchestrator/src/jobs/mod.rs +++ b/crates/orchestrator/src/jobs/mod.rs @@ -8,7 +8,7 @@ use async_trait::async_trait; use chrono::Utc; use color_eyre::eyre::{eyre, Context}; use constants::{ - JOB_METADATA_ERROR, JOB_METADATA_FAILURE_REASON, JOB_METADATA_ORCHESTRATOR_UNIQUE_ID, + JOB_METADATA_ERROR, JOB_METADATA_FAILURE_REASON, JOB_METADATA_ORCHESTRATOR_SERVICE_ID, JOB_METADATA_PROCESSING_COMPLETED_AT, }; use conversion::parse_string; @@ -339,7 +339,7 @@ pub async fn process_job(id: Uuid, config: Arc) -> Result<(), JobError> || JobItemUpdates::new().update_status(JobStatus::LockedForProcessing), |orchestrator_id| { let mut new_metadata = job.metadata.clone(); - new_metadata.insert(JOB_METADATA_ORCHESTRATOR_UNIQUE_ID.to_string(), orchestrator_id); + new_metadata.insert(JOB_METADATA_ORCHESTRATOR_SERVICE_ID.to_string(), orchestrator_id); JobItemUpdates::new().update_status(JobStatus::LockedForProcessing).update_metadata(new_metadata) }, )