I am executing a task asynchronously (with the `.s...
# ask-community
a
I am executing a task asynchronously (with the
.submit()
method), the task executes a deployment using the
run_deployment()
method, then the deployment creates a
flow_run
. I need to obtain the final status of the execution of the
flow_run
and that the final status of the task that executes the deployment is the same final status of the execution of the flow_run (subflow). Currently, my task that executes the deployment remains
COMPLETED
regardless of the final state of the execution of the flow_run that was triggered by the deployment.
Copy code
from prefect.deployments import run_deployment

run_deploy = run_deployment_task.with_options(name=<NAME>).submit(
        deployment_name=,
        environment=environment)
run_deploy.wait()
🙂 1
😱 1
😢 1
👀 3