Skip to content

Commit 5ffcece

Browse files
committed
Fix Slurm status reporting
1 parent 977009d commit 5ffcece

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/client/commands/reports.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -721,9 +721,14 @@ pub fn build_results_report(
721721
}
722722
"slurm" => {
723723
// For slurm runner, extract slurm job ID from scheduler JSON
724+
// The value may be stored as either a string or integer
724725
if let Some(scheduler_value) = &compute_node.scheduler
725726
&& let Some(slurm_job_id_val) = scheduler_value.get("slurm_job_id")
726-
&& let Some(slurm_job_id_str) = slurm_job_id_val.as_str()
727+
&& let Some(slurm_job_id_str) = slurm_job_id_val
728+
.as_str()
729+
.map(|s| s.to_string())
730+
.or_else(|| slurm_job_id_val.as_i64().map(|n| n.to_string()))
731+
.as_deref()
727732
{
728733
slurm_job_id = Some(slurm_job_id_str.to_string());
729734

0 commit comments

Comments
 (0)