Hi all, I'm having trouble finding any documentation around instantiating flow runs from a server app (fastapi). At present, here's the setup:
1. cloud as the backend
2. local agent + executor
3. web service (fastapi) running inside a docker container on my local machine
If I've already registered some tasks by manually running a script, how am I supposed to instantiate flow runs from the web service? The python scripts with the task and flow definitions are also available for flask app
Manik Singh
02/23/2021, 3:34 AM
I think what i probably need is
prefect.tasks.prefect.flow_run.StartFlowRun
but where and how do i configure the access tokens for this function to run as expected?
thanks for replying.
Through the client, can I create a flow run just on the basis of the flow name, and the latest un-archived version gets instantiated?
z
Zanie
02/23/2021, 4:00 AM
It requires the
flow_id
which you'd get when you register the flow. You can query for the latest unarchived run by flow name beforehand if you'd like. There's a user-contributed PR in progress to do this query for you (https://github.com/PrefectHQ/prefect/pull/4146) but you can also just look at the source code at
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.