Stop tasks on nodes before deleting task queues (#801)

This commit is contained in:
bmc-msft
2021-05-17 14:59:13 -04:00
committed by GitHub
parent 194ea49f03
commit ff140a6b1b
3 changed files with 16 additions and 5 deletions

View File

@ -239,6 +239,8 @@ class Node(BASE_NODE, ORMMixin):
task = Task.get_by_task_id(entry.task_id)
if isinstance(task, Task):
task.mark_failed(error)
if not self.debug_keep_node:
entry.delete()
def could_shrink_scaleset(self) -> bool:
from .scalesets import ScalesetShrinkQueue