elbaro
02/19/2021, 1:45 AM...
with Flow('flow') as flow:
..
flow.register(project_name='project1')
flow.run(parameters=dict(, ..))
flow.run(parameters=dict(, ..))
[2021-02-19 ...] INFO - prefect.TaskRunner | Task '..': Starting task run..
[2021-02-19 ...] INFO - prefect.TaskRunner | Task '..': Finished task run for task with final state: 'Success'
...
Clikcing Flow URL shows 404.Amanda Wee
02/19/2021, 2:05 AMprefect agent local start
then go to the ui and start a flow run?elbaro
02/19/2021, 2:08 AMWaiting for flow runs...
and UI shows this agent.Amanda Wee
02/19/2021, 2:11 AMelbaro
02/19/2021, 2:14 AMChris White
flow.run
is only intended to be used for local testing / “interactive mode”. To have a run show up in the UI requires that your run was created and managed by the backend.
So if you first remove the two calls to flow.run
from your script, and then start up your agent + go to the UI to kick off a flow run as Amanda suggested, you should be good to goelbaro
02/19/2021, 2:15 AMflow.register()
enough to run the flow? I have been searching how to provide parameters to register()
but could't find one.Chris White
flow.register
registers the existence of the Flow with the backend; to run the flow you need to either use a Prefect Client to call create_flow_run
or navigate to the flow in the UI and click the “Run” button, which will allow you to provide whatever parameters you wantelbaro
02/19/2021, 2:24 AMflow_id
?
flow.register(project_name='project-name')
client = prefect.client.client.Client()
client.create_flow_run(??, parameters=dict(..))
client.create_flow_run(??, parameters=dict(..))
Chris White
flow_id = flow.register(...)
elbaro
02/19/2021, 2:26 AMChris White