Only collect topology if peers changed

This commit is contained in:
Nel Nibcord
2024-12-15 02:50:34 -08:00
committed by Alex Cheema
parent 06c2e236b8
commit 08912d1b64

View File

@@ -541,8 +541,8 @@ class Node:
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}")