Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Ronnie Dutta <61982285+MetRonnie@users.noreply.github.com>
  • Loading branch information
wxtim and MetRonnie committed May 28, 2024
1 parent d30ac43 commit 9976751
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cylc/flow/platforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ def get_platform_from_group(
else:
platform_names = group['platforms']

# Return False if there are no platforms available to be selected.
# If there are no platforms available to be selected:
if not platform_names:
hosts_consumed = [
host
Expand Down
10 changes: 4 additions & 6 deletions cylc/flow/task_job_mgr.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
)
from shutil import rmtree
from time import time
from typing import TYPE_CHECKING, Any, Union, Optional
from typing import TYPE_CHECKING, Any, List, Union, Optional

from cylc.flow import LOG
from cylc.flow.job_runner_mgr import JobPollContext
Expand Down Expand Up @@ -230,7 +230,7 @@ def prep_submit_task_jobs(self, workflow, itasks, check_syntax=True):
"""
prepared_tasks = []
bad_tasks = []
out_of_hosts_tasks: list = []
out_of_hosts_tasks: List[TaskProxy] = []
for itask in itasks:
if not itask.state(TASK_STATUS_PREPARING):
# bump the submit_num *before* resetting the state so that the
Expand Down Expand Up @@ -288,10 +288,8 @@ def submit_task_jobs(self, workflow, itasks, curve_auth,
auth_itasks.setdefault(platform_name, [])
auth_itasks[platform_name].append(itask)
# Submit task jobs for each platform
done_tasks = bad_tasks

# Out of host tasks can be considered done for now:
[done_tasks.append(itask) for itask in out_of_hosts_tasks]
# Non-prepared tasks can be considered done for now:
done_tasks = [*bad_tasks, *out_of_hosts_tasks]

for _, itasks in sorted(auth_itasks.items()):
# Find the first platform where >1 host has not been tried and
Expand Down

0 comments on commit 9976751

Please sign in to comment.