daemon: moved SetQeueue into utils to be leveraged by others, updated MoveNodesStreamer to leverage SetQueue, this will allow a means to stream node movements, but if position changes happen faster than processing, the latest position will override prior pushes and the latest position will be pulled off the queue

This commit is contained in:
Blake Harnden 2022-04-28 16:12:31 -07:00
parent fe0bc2b405
commit aa8ea40ce6
4 changed files with 36 additions and 23 deletions

View file

@ -1213,3 +1213,15 @@ class MoveNodesRequest:
position=position,
geo=geo,
)
def __members(self) -> Tuple[int, int]:
return self.session_id, self.node_id
def __eq__(self, other: "MoveNodesRequest") -> bool:
if type(other) is type(self):
return self.__members() == other.__members()
else:
return False
def __hash__(self):
return hash(self.__members())