mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-11 17:51:33 +00:00
adding node shutdown (#252)
This commit is contained in:
@ -898,6 +898,9 @@ class Scaleset(BASE_SCALESET, ORMMixin):
|
||||
def shutdown(self) -> None:
|
||||
size = get_vmss_size(self.scaleset_id)
|
||||
logging.info("scaleset shutdown: %s (current size: %s)", self.scaleset_id, size)
|
||||
nodes = Node.search_states(scaleset_id=self.scaleset_id)
|
||||
for node in nodes:
|
||||
node.set_shutdown()
|
||||
if size is None or size == 0:
|
||||
self.halt()
|
||||
|
||||
|
Reference in New Issue
Block a user