Skip to content

Commit

Permalink
install: sort workflows by ID when listing (#5378)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliver-sanders authored Feb 27, 2023
1 parent a0e5d41 commit 74056a9
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions cylc/flow/scripts/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,12 +215,16 @@ async def scan(wf_name: str, ping: bool = True) -> None:
'source': False,
'ping': ping, # get status of scanned workflows
})
active = [
item async for item in get_pipe(
opts, None,
scan_dir=get_workflow_run_dir(wf_name) # restricted scan
)
]
active = sorted(
[
item async for item in get_pipe(
opts,
None,
scan_dir=get_workflow_run_dir(wf_name) # restricted scan
)
],
key=lambda flow: flow['name']
)
if active:
n = len(active)
grammar = (
Expand Down

0 comments on commit 74056a9

Please sign in to comment.