Skip to content

Commit

Permalink
Improve stall logic
Browse files Browse the repository at this point in the history
Occasionally, the suite can be marked as stalled, even though the task
pool only contains succeeded tasks. This change fixes the problem.
  • Loading branch information
matthewrmshin committed Jan 23, 2017
1 parent 7339943 commit a6349ed
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/cylc/task_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -797,15 +797,21 @@ def warn_stop_orphans(self):

def pool_is_stalled(self):
"""Return True if no active, queued or clock trigger awaiting tasks"""
can_be_stalled = False
for itask in self.get_tasks():
if itask.point > self.stop_point:
# Don't consider task beyond stop point
continue
if itask.state.status in [
TASK_STATUS_SUCCEEDED, TASK_STATUS_EXPIRED]:
# Succeeded and expired tasks don't stall the suite
continue
if itask.state.status in TASK_STATUSES_NOT_STALLED or (
not itask.start_time_reached() and
itask.state.status not in TASK_STATUSES_FINAL):
return False
return True
can_be_stalled = True
return can_be_stalled

def report_stalled_task_deps(self):
"""Return a set of unmet dependencies"""
Expand Down

0 comments on commit a6349ed

Please sign in to comment.