Martim Lobao
10/21/2021, 10:44 AMAnna Geller
from datetime import timedelta
@task(max_retries=5, retry_delay=timedelta(minutes=1))
When it comes to “restart”, the only way for it to work is if you have results configured for this task, because in order to restart this task, Prefect needs to know all inputs required by this task.
The way restarts work is that you trigger a flow run from a specific failed task. Since you restart from a TaskRun page in the UI, I believe that you can restart even if some tasks in this FlowRun are not finished yet. However, you cannot restart only one specific task, but you restart the entire FlowRun from a specific failed TaskRun downstream.Martim Lobao
10/21/2021, 11:16 AMMartim Lobao
10/21/2021, 11:17 AMMartim Lobao
10/21/2021, 11:17 AMMartim Lobao
10/21/2021, 11:21 AMAnna Geller
Martim Lobao
10/21/2021, 11:27 AMMartim Lobao
10/21/2021, 11:28 AMAnna Geller
Martim Lobao
10/21/2021, 11:36 AMAnna Geller
Anna Geller
create_flow_run
that allows you to run a Flow as if it were a task. This way, you could rerun each “task” (because it’s an independent flow) at any time, by triggering the independent child flow that failed.Martim Lobao
10/21/2021, 11:48 AMKevin Kho
Failed
task to Scheduled
. This will mark that the task run should be run and I think it will be picked up again. Not super sure.
You’re trying to restart one task from the UI right? and not touch the code?Martim Lobao
10/21/2021, 6:49 PMKevin Kho
Martim Lobao
10/21/2021, 6:51 PM