Noah Nethery
05/18/2020, 8:14 PMfrom prefect import task, Flow, Parameter
from prefect import Client
@task(log_stdout=True)
def say_hello(name):
print("Hello, {}!".format(name))
return True
@task
def print_completed(status):
if status:
print('Success')
with Flow("Simple-Flow") as flow:
name = Parameter('name')
task1 = say_hello(name)
print_completed(task1)
client = Client()
flow.register(project_name="Hello K8s")
Chris White
05/18/2020, 8:18 PMNoah Nethery
05/18/2020, 8:42 PMChris White
05/18/2020, 8:42 PM