Hey all, is there a way to automatically cancel o...
# prefect-cloud
r
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
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
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
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
OK!