YD
08/25/2021, 10:51 PM@task(timeout=60)
def task_1():
x = func1(...)
return x == 0
@task(timeout=60)
def task_2(r):
y = func2(...)
return y == 0
@task(timeout=60)
def task_3():
z = func3(...)
return z == 0
def main():
with Flow("my-flow", executor=LocalDaskExecutor()) as flow:
r = task_1()
r = task_2(r)
r2 = task_3()
if task_1 times out and fail, task_2 will not run.
What can I change so that I can still use the LocalDaskExecutor but allow task_2 to run even if task_1 failed ?nicholas
always_run trigger on task_2 like this:
from prefect.triggers import always_run
...
@task(timeout=60)
def task_2(r, trigger=always_run):
returnnicholas
Benny Warlick
08/26/2021, 2:17 PMYD
08/26/2021, 4:32 PM