Skip to content

Commit

Permalink
fix cleaner, use status as lowercase (#1654)
Browse files Browse the repository at this point in the history
  • Loading branch information
pepoviola authored Jan 8, 2024
1 parent aad8d5f commit fee5b9b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/k8s-cleaner/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ async fn needs_to_delete(
.text()
.await?;
let res_json: serde_json::Value = serde_json::from_str(res.as_str())?;
let status = res_json["status"]["text"].as_str().unwrap_or_default();
let status = res_json["status"]["text"].as_str().unwrap_or_default().to_lowercase();
let needs = status.contains("failed") || status.contains("canceled");
println!("jobid: {job_id} - status: {status} - will delete: {needs}");
Ok(needs)
Expand Down

0 comments on commit fee5b9b

Please sign in to comment.