fix(runner): only check for errors when a task is no longer running

This commit is contained in:
Folke Lemaitre 2024-06-27 11:32:30 +02:00
parent a0391c3e21
commit e02c5b1b57
No known key found for this signature in database
GPG Key ID: 41F8B1FBACAE2040
1 changed files with 4 additions and 4 deletions

View File

@ -100,16 +100,16 @@ function Runner:_start()
local is_running = s.task and s.task:is_running()
local step = self._pipeline[s.step]
if is_running then
-- still running
active = active + 1
-- selene:allow(empty_if)
if s.task and s.task:has_errors() then
elseif s.task and s.task:has_errors() then
-- don't continue tasks if there are errors
elseif step and step.task == "wait" and not resume then
-- waiting for sync
waiting = waiting + 1
wait_step = s.step
elseif is_running then
-- still running
active = active + 1
else
next[#next + 1] = name
end