Skip to content

Commit 3739402

Browse files
committed
flux-jobs: support getting cwd
Problem: The job-list module now supports retrieving a jobs current working directory, but flux-jobs does not support it. Solution: Support getting a job's current working directory through a new "cwd" field.
1 parent d751e7f commit 3739402

File tree

1 file changed

+3
-0
lines changed
  • src/bindings/python/flux/job

1 file changed

+3
-0
lines changed

src/bindings/python/flux/job/info.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,7 @@ class JobInfo:
281281
"duration": 0.0,
282282
"expiration": 0.0,
283283
"name": "",
284+
"cwd": "",
284285
"queue": "",
285286
"ntasks": "",
286287
"ncores": "",
@@ -559,6 +560,7 @@ def job_fields_to_attrs(fields):
559560
"state_single": ("state",),
560561
"state_emoji": ("state",),
561562
"name": ("name",),
563+
"cwd": ("cwd",),
562564
"queue": ("queue",),
563565
"ntasks": ("ntasks",),
564566
"ncores": ("ncores",),
@@ -641,6 +643,7 @@ class JobInfoFormat(flux.util.OutputFormat):
641643
"state_single": "S",
642644
"state_emoji": "STATE",
643645
"name": "NAME",
646+
"cwd": "CWD",
644647
"queue": "QUEUE",
645648
"ntasks": "NTASKS",
646649
"ncores": "NCORES",

0 commit comments

Comments
 (0)