Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions svc/pkg/ds/src/workers/nomad_monitor_alloc_plan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,8 @@ async fn worker(

// Check if run found
let Some(DbOutput { server_id }) = db_output else {
if ctx.req_dt() > util::duration::minutes(5) {
tracing::error!("discarding stale message");
return Ok(());
} else {
retry_bail!("run not found, may be race condition with insertion");
}
tracing::error!("run not found, may be race condition with insertion");
return Ok(());
};

tracing::info!(%job_id, %server_id, "updated run");
Expand Down
8 changes: 2 additions & 6 deletions svc/pkg/ds/src/workers/nomad_monitor_alloc_update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,8 @@ async fn worker(
.await?;

let Some((run_id, finish_ts)) = run_row else {
if ctx.req_dt() > util::duration::minutes(5) {
tracing::error!("discarding stale message");
return Ok(());
} else {
retry_bail!("run not found, may be race condition with insertion");
}
tracing::error!("run not found, may be race condition with insertion");
return Ok(());
};

crate::workers::webhook::call(ctx, alloc_id.to_string()).await?;
Expand Down