allow -u to accept a comma separated list of users

This commit is contained in:
2026-07-06 08:24:33 +02:00
parent 6faf691c2b
commit ccb4f60ff4
+3 -2
View File
@@ -903,7 +903,8 @@ def filter_records(records: list[JobRecord],
records = [r for r in records if r.state in allowed_states]
if filter_user:
records = [r for r in records if r.username == filter_user]
userlist = filter_user.split(',')
records = [r for r in records if r.username in userlist]
return records
@@ -1238,7 +1239,7 @@ def parse_args(argv: list[str]) -> argparse.Namespace:
default="now - 24 hours")
p.add_argument("-E", "--end", help="sacct end time, passed to sacct -E",
default="now")
p.add_argument("-u", "--user", help="restrict to a single user at sacct DB search")
p.add_argument("-u", "--user", help="comma separated list of users (affects sacct DB search or filters later from cache file)")
p.add_argument("-U", "--aggr-user", action="store_true", help="aggregate jobs by user, CPUs, nodes, ReqMem, and timelimit")
p.add_argument(
"-R",