Set the process finished date when a process fails with some tasks staying unscheduled
When a task fails on a process, Process.finished
is only set when there are no more tasks that are not in a final state. However, some processes can still have tasks that are not in a final state even though the process will never run again. If any task depends on another task that has failed, then that task will stay unscheduled forever.
For example, in this process, the init task has been stopped. The other two tasks will never run and stay unscheduled
.
In the process list, the process is still marked as "Started 6 days ago", meaning it is not finished:
This will likely become more visible after frontend#1272 (closed), since the new phrasing for runtimes implies that the process has been running for 6 whole days and doing nothing.
When a task is marked as completed, we immediately mark any of its dependents that have all their dependencies satisfied as pending
. We can therefore set Process.finished
anytime a task enters any final state, and there are no tasks marked as pending
or running
.