https://prefect.io logo
Title
j

Jay Sundaram

03/09/2021, 1:52 PM
If a task/node fails, but the rest of the flow is still running- after some intervention, how do we restart that one failed task/node while the rest of the flow is still running?
m

Mariia Kerimova

03/09/2021, 2:41 PM
It’s useful to define retries on the task, which will retry executing the task if it fails. You can read about it here. Also, it’s easy to restart failed task run in UI.
z

Zanie

03/09/2021, 2:52 PM
You can also
Pause
a task for approval or rerun the entire flow with cached results for already finished nodes.
:upvote: 1
j

Jay Sundaram

03/09/2021, 6:56 PM
okay i see. i can understand the use of retries for a certain set of encountered exceptions (e.g.: database connection momentarily severed) but what about the case where someone needs to investigate root cause where the amount of time needed to investigate exceeds the retry period? is the only option available to us then to wait for the entire flow's execution to complete and only once completed then we can resume the flow so that the failed task (and all of its downstream tasks) will be attempted?
m

Mariia Kerimova

03/09/2021, 11:22 PM
If the task fails, downstream tasks will not be executed, unless you specify triggers on your tasks. You can read more about triggers here. If you found the root cause of the issue in the flow and fixed it, you can register a new fixed flow and run a new version of your flow. If the root cause was separately from the flow, you can restart the flow from the failed task. I hope it answers your question.
👍 1