Skip to content

Commit

Permalink
Hide waiting tasks from n=0.
Browse files Browse the repository at this point in the history
  • Loading branch information
hjoliver committed Sep 17, 2020
1 parent 8406f4e commit 90348fa
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions cylc/flow/task_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,11 +241,17 @@ def add_to_runahead_pool(self, itask, is_new=True):
return itask

def release_runahead_tasks(self):
"""Restrict the number of active cycle points.
"""Release tasks from the runahead pool to the main pool.
This serves to:
- restrict the number of active cycle points
- keep partially-satisfied waiting tasks out of the n=0 active pool
Compute max active cycle points or runahead limit, and release tasks to
the main pool if they are below that point (and <= the stop point, if
there is a stop point). Return True if any tasks released, else False.
there is a stop point).
Return True if any tasks were released, else False.
"""
released = False
Expand Down Expand Up @@ -339,6 +345,9 @@ def release_runahead_tasks(self):
for point, itask_id_map in self.runahead_pool.copy().items():
if point <= latest_allowed_point:
for itask in itask_id_map.copy().values():
if itask.is_task_prereqs_not_done():
# Only release if all prerequisites are satisfied.
continue
self.release_runahead_task(itask)
released = True
return released
Expand Down

0 comments on commit 90348fa

Please sign in to comment.