Skip to content

Commit

Permalink
update: unique_id -> service_id
Browse files Browse the repository at this point in the history
  • Loading branch information
heemankv committed Jan 24, 2025
1 parent d5b66c6 commit b835a63
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion crates/orchestrator/src/database/mongodb/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ impl Database for MongoDb {
"status": {
"$in": job_status.iter().map(|status| bson::to_bson(status).unwrap_or(Bson::Null)).collect::<Vec<Bson>>()
},
"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());
Expand Down
2 changes: 1 addition & 1 deletion crates/orchestrator/src/jobs/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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";
4 changes: 2 additions & 2 deletions crates/orchestrator/src/jobs/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -339,7 +339,7 @@ pub async fn process_job(id: Uuid, config: Arc<Config>) -> 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)
},
)
Expand Down

0 comments on commit b835a63

Please sign in to comment.