Robin
07/25/2023, 1:10 PMNO flows in certain states for a certain time
?
Maybe there is another more elegant solution, but the idea is to shut down certain resources if there are no flows running, pending or late etc. 🙂Will Raphaelson
07/25/2023, 3:36 PMRobin
07/25/2023, 4:35 PM{
"match": {
"prefect.resource.id": "prefect.flow-run.*"
},
"match_related": {},
"after": [
"prefect.flow-run.Success"
],
"expect": [
"prefect.flow-run.Running"
],
"for_each": [
"prefect.resource.id"
],
"posture": "Proactive",
"threshold": 1,
"within": 180
}
Does this automation do the following?
• whenever a flow run switches to Success
• expect another flow to be in running state within 3 minutes
• if not: trigger an actionWill Raphaelson
07/25/2023, 4:49 PMprefect.flow-run.Success
is actually not an event. what you’re looking for is prefect.flow-run.Completed. you can see the recent events in the event feed.Robin
07/26/2023, 6:24 PMtrigger a flow run, if no other flow switches to the Running state within 3 minutes
Does the following code do that?
{
"match": {
"prefect.resource.id": "prefect.flow-run.*"
},
"match_related": {},
"after": [
"prefect.flow-run.Completed"
],
"expect": [
"prefect.flow-run.Running"
],
"posture": "Proactive",
"threshold": 1,
"within": 180
}
Will Raphaelson
07/26/2023, 6:27 PMRobin
07/26/2023, 6:27 PMWill Raphaelson
07/27/2023, 3:00 PMRobin
07/27/2023, 4:20 PM