Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9123173
D5916.id21269.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
917 B
Subscribers
None
D5916.id21269.diff
View Options
diff --git a/swh/scheduler/cli/task.py b/swh/scheduler/cli/task.py
--- a/swh/scheduler/cli/task.py
+++ b/swh/scheduler/cli/task.py
@@ -501,6 +501,8 @@
):
"""List tasks.
"""
+ from operator import itemgetter
+
scheduler = ctx.obj["scheduler"]
if not scheduler:
raise ValueError("Scheduler class (local/remote) must be instantiated")
@@ -538,11 +540,11 @@
runs = {}
output.append("Found %d tasks\n" % (len(tasks)))
- for task in tasks:
+ for task in sorted(tasks, key=itemgetter("id")):
output.append(pretty_print_task(task, full=True))
if runs.get(task["id"]):
output.append(click.style(" Executions:", bold=True))
- for run in runs[task["id"]]:
+ for run in sorted(runs[task["id"]], key=itemgetter("id")):
output.append(pretty_print_run(run, indent=4))
click.echo("\n".join(output))
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jun 20, 5:07 PM (2 w, 20 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3219057
Attached To
D5916: cli/task: Ensure cli output is always in the same order
Event Timeline
Log In to Comment