Skip to content

Commit 65a00ce

Browse files
authored
Merge pull request #7045 from oliver-sanders/6855
runahead limit: fix possible mode of failure
2 parents 4009fe8 + 4b0024e commit 65a00ce

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

cylc/flow/task_pool.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -442,12 +442,11 @@ def compute_runahead(self, force=False) -> bool:
442442
self._prev_runahead_sequence_points = sequence_points
443443
self._prev_runahead_base_point = base_point
444444

445-
if count_cycles:
446-
if not sequence_points:
447-
limit_point = base_point
448-
else:
449-
# (len(list) may be less than ilimit due to sequence end)
450-
limit_point = sorted(sequence_points)[:ilimit + 1][-1]
445+
if not sequence_points:
446+
limit_point = base_point
447+
elif count_cycles:
448+
# (len(list) may be less than ilimit due to sequence end)
449+
limit_point = sorted(sequence_points)[:ilimit + 1][-1]
451450
else:
452451
limit_point = max(sequence_points)
453452

0 commit comments

Comments
 (0)