Skip to content

Commit

Permalink
Merge pull request #202 from mila-iqia/display-jobs-states
Browse files Browse the repository at this point in the history
Fix job state display
  • Loading branch information
soline-b authored Sep 26, 2024
2 parents 2f39bff + ebff19a commit d07f64c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions clockwork_web/core/jobs_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,14 @@ def get_filtered_and_paginated_jobs(
# If want_count is False, nbr_total_jobs is None
nbr_total_jobs = None

# This handles the different format of jobs states we retrieve, through the different Slurm version
for job in LD_jobs:
if (
isinstance(job["slurm"]["job_state"], list)
and len(job["slurm"]["job_state"]) > 0
):
job["slurm"]["job_state"] = job["slurm"]["job_state"][0]

# Return the retrieved jobs and the number of unpagined jobs (if requested)
return (LD_jobs, nbr_total_jobs)

Expand Down

0 comments on commit d07f64c

Please sign in to comment.