https://prefect.io logo
Title
r

Robin

05/20/2023, 9:21 PM
Hey all, is there a way to automatically cancel or rerun tasks when a work queue gets unhealthy? For example, an EC2 instance is shut down periodically. It seems like tasks that are still running when the instance is shut down are lost in the limbo, instead of noticing the unhealthy work queue and cancelling / restarting when the worker is back online 🤔
1
c

Chris Pickett

05/22/2023, 1:58 PM
Hi @Robin! If you’re using Prefect Cloud you can do that with an Automation. When you’re in the workspace create an automation via the link in the sidebar. From there select the
Work queue health
trigger type and fill in the rest of the details. Reach out if you run into issues.
r

Robin

05/22/2023, 2:40 PM
Thanks for the pointer! I am going to have a look and will let you know if I need further assistance 🙏
PS: I guess this can also be done in python?
c

Chris Pickett

05/22/2023, 2:58 PM
Not at the moment, Automations are a cloud-only feature and we don’t have any plans, that I’m aware of, to package it or an interface to it, into the core library at this time.
r

Robin

05/22/2023, 3:40 PM
OK!