Arthur
03/26/2024, 4:02 PMMarvin
03/26/2024, 4:03 PMrun_deployment
in Prefect does not directly return a .future
object, however, it can be used with timeout=0
to return immediately and not block until the scheduled flow run finishes. By using timeout=0
, you could programmatically control subsequent actions, much like you would with futures or promises in other contexts.
Here's an excerpt from the Prefect docs that explains this:
"Run a deployment without blocking
By default, run_deployment
blocks until the scheduled flow run finishes executing. Pass timeout=0
to return immediately and not block. If you call run_deployment
from within a flow or task, the scheduled flow run will be linked to the calling flow run (or the calling task's flow run) as a subflow run by default."
For more information, you can refer to the Prefect Deployments Concept Documentation.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.
Powered by