Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Cancel tasks when server shuts down #5174
When the server is shutdown (or crashes), it leaves running tasks in an unknown state. We currently mark tasks as failed when the server comes back online (or another server in the HA cluster determines its offline).
However, we cancel the tasks during service shutdown, and actively trigger a task cancellation, rather than just marking the task as canceled later. This will mean we can either terminate the task that is running (or cancel at a safe point if its a built in task like retention or susbcription processing).
We should also take advantage of the opportunity to distinguish tasks that were cancelled by a user from tasks that were aborted due to a server crash or shutdown.
At the moment, a task that was cancelled due to a server going offline is marked as failed and has a tooltip explaining the situation - this is the only way to determine something is wrong.
source: internally raised