Chris McLaughlin
12/28/2021, 9:48 PMKevin Kho
from prefect.tasks... import SomeTask
some = SomeTask(state_handlers=[mystatehandler])
with Flow(..) as flow:
some(x=1, y=2)
Chris McLaughlin
12/28/2021, 9:52 PMKevin Kho
@task()
. If your task has inputs, you can still stick them in there.
some = SomeTask(x=1, y=2, state_handlers=[mystatehandler], triggers=...)
with Flow(...) as flow:
some()