From f4b5c1ae73722f93fa8c80ea76d9133534b7520e Mon Sep 17 00:00:00 2001 From: bmc-msft <41130664+bmc-msft@users.noreply.github.com> Date: Mon, 26 Apr 2021 15:19:46 -0400 Subject: [PATCH] when processing node updates, don't wait on the node in cases it should be stopped (#834) In situations when the node should be done, mark it as done without waiting for the node to respond to the Done command. --- src/api-service/__app__/onefuzzlib/workers/nodes.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/api-service/__app__/onefuzzlib/workers/nodes.py b/src/api-service/__app__/onefuzzlib/workers/nodes.py index 67bfeb311..a3239e265 100644 --- a/src/api-service/__app__/onefuzzlib/workers/nodes.py +++ b/src/api-service/__app__/onefuzzlib/workers/nodes.py @@ -217,7 +217,7 @@ class Node(BASE_NODE, ORMMixin): "node: stopping busy node with all tasks complete: %s", self.machine_id, ) - self.stop() + self.stop(done=True) return True def mark_tasks_stopped_early(self, error: Optional[Error] = None) -> None: @@ -253,7 +253,7 @@ class Node(BASE_NODE, ORMMixin): self.version, __version__, ) - self.stop() + self.stop(done=True) return False if self.state in NodeState.ready_for_reset(): @@ -267,7 +267,7 @@ class Node(BASE_NODE, ORMMixin): "can_schedule is set to be deleted. machine_id:%s", self.machine_id, ) - self.stop() + self.stop(done=True) return False if self.reimage_requested: @@ -275,7 +275,7 @@ class Node(BASE_NODE, ORMMixin): "can_schedule is set to be reimaged. machine_id:%s", self.machine_id, ) - self.stop() + self.stop(done=True) return False if self.could_shrink_scaleset():