Joe Lyman
09/11/2020, 4:15 PMwith Flow("myflow") as myflow:
# tasks
myflow.register(project_name="myproj")
Now, separately in b.py
I run a file watcher that needs to trigger "myflow" (in a non-blocking fashion) when a file arrives. I stumbled across:
FlowRunTask(project_name="myproj", flow_name="myflow")
but I don't know if this is correct. I considered from a import myflow; myflow.run()
in b.py
also - although the flows seemed to run, they didn't appear in the UI.nicholas
09/11/2020, 4:21 PMJoe Lyman
09/11/2020, 4:37 PMClient
was for talking with the cloud, whereas I am running a local server currently. I have anyway managed to get it firing off runs that appear in the UI, the only downside being I have had to find out the UUID manually and hardcode that into b.py
. Can client.create_flow_run()
not make use of flow and project names? It seems like
prefect run server --name "My Flow Name"
can, so I could get around it by just making system call from b.py
I guess, but it seems messy.nicholas
09/11/2020, 4:48 PMquery {
flow( where: { name: { _eq: "My Flow Name" }, project: { name: { _eq: "Your Project Name" } }, archived: { _eq: false } ) {
id
}
}
Joe Lyman
09/11/2020, 4:50 PMnicholas
09/11/2020, 4:50 PMJavier Velez
01/06/2021, 3:20 PM