Alberto de Santos
10/14/2020, 8:50 AMJenny
10/14/2020, 11:23 AMAlberto de Santos
10/14/2020, 11:39 AMJenny
10/14/2020, 12:43 PMfrom prefect import Flow, task
from prefect.client.client import Client
@task()
def hello():
print('hello')
with Flow(name='simple-flow') as flow:
hello()
# flow.run()
id = flow.register('PROJECT_NAME')
client = Client()
client.create_flow_run(flow_id=id)
Alberto de Santos
10/14/2020, 12:51 PMJenny
10/14/2020, 12:52 PMAlberto de Santos
10/14/2020, 12:53 PMJenny
10/14/2020, 1:01 PMJames Phoenix
10/14/2020, 2:15 PMJenny
10/14/2020, 2:19 PMJames Phoenix
10/14/2020, 2:20 PMJenny
10/14/2020, 2:35 PMJames Phoenix
10/14/2020, 2:39 PMAlberto de Santos
10/14/2020, 4:28 PMfrom prefect import Flow, task
from prefect.client.client import Client
@task()
def hello():
print('hello')
with Flow(name='simple-flow') as flow:
hello()
# flow.run()
id = flow.register('PROJECT_NAME')
client = Client()
client.create_flow_run(flow_id=id)
Imagine that I register the flow in a script different from the one I execute the client, how could I then know the id flow? Is there here any best practice?Jenny
10/14/2020, 5:15 PM