from prefect import flow, task
@task
def add_one(x):
return x + 1
@flow
def my_flow():
# avoided raising an exception via `return_state=True`
state = add_one("1", return_state=True)
assert state.is_failed()
# the flow function returns successfully!
return
My question is:
return_state=True
run and waits for task run? I mean, if I use
state = add_one.sumbmit("1", return_state=True)
, it seems that it waits...but does it use the task runner? Is it intended? Does it under the hood executes the old prefectv2
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.