From 470f961fbb3cd506feba02fcc7259f24854b37a8 Mon Sep 17 00:00:00 2001 From: Nel Nibcord Date: Sun, 15 Dec 2024 02:50:34 -0800 Subject: [PATCH] Only collect topology if peers changed --- exo/orchestration/node.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exo/orchestration/node.py b/exo/orchestration/node.py index 131b75e58..b68cd6927 100644 --- a/exo/orchestration/node.py +++ b/exo/orchestration/node.py @@ -542,8 +542,8 @@ async def periodic_topology_collection(self, interval: int): try: did_peers_change = await self.update_peers() if DEBUG >= 2: print(f"{did_peers_change=}") - await self.collect_topology(set()) if did_peers_change: + await self.collect_topology(set()) await self.select_best_inference_engine() except Exception as e: print(f"Error collecting topology: {e}")