Skip to content

Commit

Permalink
flux-jobs: add endreason output format
Browse files Browse the repository at this point in the history
Problem: Now that the inactive_reason output field is available, it
would be nice if there were a convenient format to output it and
other pertinent information related to it.

Solution: Add a new "endreason" output format.
  • Loading branch information
chu11 committed May 16, 2023
1 parent 8e3c857 commit 8f704e2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/cmd/flux-jobs.py
Expand Up @@ -60,6 +60,13 @@ class FluxJobsConfig(UtilConfig):
"{priority:<12} {state:<8.8} {dependencies}"
),
},
"endreason": {
"description": "Show why each job ended",
"format": (
"{id.f58:>12} ?:{queue:<8.8} {username:<8.8} {name:<10.10+} "
"{status_abbrev:>2.2} {t_inactive!d:%b%d %R::>12h} {inactive_reason}"
),
},
}

def __init__(self):
Expand Down

0 comments on commit 8f704e2

Please sign in to comment.