aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/oar.rs11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/oar.rs b/src/oar.rs
index 5a702b4..fb73109 100644
--- a/src/oar.rs
+++ b/src/oar.rs
@@ -153,7 +153,16 @@ fn extract_job_ids_from_oarstat_output(output: &str) -> Result<Vec<u32>> {
153 }; 153 };
154 154
155 let mut job_ids = Vec::default(); 155 let mut job_ids = Vec::default();
156 for key in object.keys() { 156 for (key, val) in object.iter() {
157 if val
158 .get("state")
159 .expect("job should have a 'state' key")
160 .as_str()
161 .expect("job state should be a string")
162 != "Running"
163 {
164 continue;
165 }
157 tracing::trace!("parsing key '{key}'"); 166 tracing::trace!("parsing key '{key}'");
158 let job_id = key.parse()?; 167 let job_id = key.parse()?;
159 job_ids.push(job_id); 168 job_ids.push(job_id);