send NodeCommandStopIfFree on node shutdown (#940)

If we move to shutdown a single node but it's not doing work, it will
wait until it picks up work to shutdown.  This shortcuts that.
This commit is contained in:
bmc-msft
2021-06-01 11:03:33 -04:00
committed by GitHub
parent 0a6021bfa1
commit b761908409

View File

@ -381,6 +381,7 @@ class Node(BASE_NODE, ORMMixin):
logging.info("setting delete_requested: %s", self.machine_id)
self.delete_requested = True
self.save()
self.send_stop_if_free()
def set_halt(self) -> None:
"""Tell the node to stop everything."""