Marc Lipoff
08/24/2022, 8:26 PMOscar Björhn
08/24/2022, 8:29 PMMarc Lipoff
08/24/2022, 8:31 PMOscar Björhn
08/24/2022, 8:37 PMJeremiah
08/24/2022, 9:45 PMyour_task.fn(…)
. This aligns with your goal of packaging them as a super task (which could have its own retry settings, for example), but would not let you see them individually in the UI.Marc Lipoff
08/24/2022, 9:50 PMJeremiah
08/24/2022, 9:58 PMfrom prefect import flow, task
@task
def task_1(x):
return x + 1.5
@task
def task_2(y):
return y + 10.5
def super_task(x):
"""
This function could be imported from anywhere and
called inside any flow; it's a normal function
"""
y = task_1(x)
z = task_2(y)
return z
@flow
def my_flow():
return super_task(17.0)
super_task
being the function you’d give peopleMarc Lipoff
08/25/2022, 2:08 PMJeremiah
08/25/2022, 7:54 PMsuper_task
purely as a convenience function; it’s equivalent to calling task_1
and task_2
yourself