Skip to content

Commit 4c08a3b

Browse files
committed
flux executor: fix broken list method
Filter jobs based on user ID (implicit in default argument) and job states. Only fetch job id attribute. Fixes #324.
1 parent 12f8293 commit 4c08a3b

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/psij/executors/flux.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,15 @@ def list(self) -> List[str]:
177177
178178
:return: The list of known tasks.
179179
"""
180-
return [x["id"] for x in flux.job.job_list(self._fh)]
180+
return [
181+
x["id"]
182+
for x in flux.job.job_list(
183+
self._fh,
184+
max_entries=100000,
185+
attrs=[],
186+
states=flux.constants.FLUX_JOB_STATE_ACTIVE,
187+
).get()["jobs"]
188+
]
181189

182190
def attach(self, job: Job, native_id: str) -> None:
183191
"""

0 commit comments

Comments
 (0)