Skip to content

Commit

Permalink
Address PR review comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
hjoliver committed Oct 13, 2021
1 parent 73b5d03 commit d3604c2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
6 changes: 2 additions & 4 deletions cylc/flow/task_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,15 +332,13 @@ def release_runahead_tasks(self):

# An intermediate list is needed here: auto-spawning of parentless
# tasks can cause the task pool to change size during iteration.
release_me = []
for itask in (
release_me = [
itask
for point, itask_id_map in self.main_pool.items()
for itask in itask_id_map.values()
if point <= runahead_limit_point
if itask.state.is_runahead
):
release_me.append(itask)
]

for itask in release_me:
self.release_runahead_task(itask, runahead_limit_point)
Expand Down
7 changes: 3 additions & 4 deletions cylc/flow/taskdef.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,8 @@ def has_only_abs_triggers(self, point):
"""Return whether I have only absolute triggers at point."""
if not self.has_abs_triggers:
return False
# Has abs triggers somewhere, but need to check the specific point.
# Has abs triggers somewhere, but need to check at point.
has_abs = False
has_other = False
for seq in self.sequences:
if not seq.is_valid(point) or seq not in self.dependencies:
continue
Expand All @@ -296,8 +295,8 @@ def has_only_abs_triggers(self, point):
):
has_abs = True
else:
has_other = True
return has_abs and not has_other
return False
return has_abs

def is_valid_point(self, point):
"""Return True if point is on-sequence and within bounds."""
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/test_task_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
from cylc.flow.scheduler import Scheduler


# NOTE: foo & bar have no parents so when released from the hidden pool at
# start-up (with workflow paused) the next instances are spawned (to hidden).
# NOTE: foo & bar have no parents so at start-up (even with the workflow
# paused) they are spawned out to the runahead limit.
EXAMPLE_FLOW_CFG = {
'scheduler': {
'allow implicit tasks': True
Expand Down

0 comments on commit d3604c2

Please sign in to comment.