Hi everyone, I am building a monitoring script for...
# ask-community
a
Hi everyone, I am building a monitoring script for some of my company's deployments. For a given deployment, I want to check if the latest flow run tied to that deployment failed. If so, I would like to schedule the next deployment run. Is there something in the Python SDK that would allow me to check the latest flow run for a deployment or would I have to use the API? An example would also be helpful.
n
hi @Alex Rodriguez - the easiest way to do this would be to use the client methods roughly like this
another way to think about this would be to have a trigger on this deployment that looks from
prefect.flow-run.Failed
events from runs of its own deployment