wiretrack
12/24/2020, 8:19 PMDylan
wiretrack
12/24/2020, 8:22 PMDylan
wiretrack
12/24/2020, 8:23 PMwith Flow('parent-flow') as flow
setting the upstreamscustomer_flow = Flow('customer_flow')
?Dylan
wiretrack
12/24/2020, 8:28 PMdependencies
in the context of the imperative api maybe they are required?from prefect import Task, Flow
# The tasks
class RunMeFirst(Task):
def run(self):
print("I'm running first!")
class PlusOneTask(Task):
def run(self, x):
return x + 1
# Instanciates the Flow
flow = Flow('My Imperative Flow')
# The task instance (I'm using the decorator format), this is where I get the error
plus_one = PlusOneTask()
# I don't have that.
flow.set_dependencies(
task=plus_one,
upstream_tasks=[RunMeFirst()],
keyword_tasks=dict(x=10))
flow.visualize()
Dylan
with Flow("my flow") as flow:
result = my_task()
with case(result, True):
#do something
wiretrack
12/24/2020, 8:47 PMDylan
wiretrack
12/24/2020, 8:49 PMDylan
wiretrack
12/24/2020, 8:59 PMDylan
wiretrack
12/24/2020, 9:01 PMDylan
wiretrack
12/24/2020, 9:02 PM