added a condition to break out of the heartbeat on the initial loop, once all components report themselves once.

This commit is contained in:
fawce
2012-07-19 20:17:44 -04:00
parent 95a987db39
commit 03b17bbfb5
+9
View File
@@ -289,6 +289,8 @@ class Controller(object):
# Hearbeat Cycle
# ==============
initializing = len(self.tracked) == 0 and len(self.finished) == 0
# Wait the responses
while self.alive:
@@ -318,6 +320,13 @@ class Controller(object):
log.info(repr(self.responses))
break
# if this is the first time heartbeating, break
# out early if we get everything tracked no need
# to hold out for the full heartbeat.
if initializing and len(self.responses) == len(self.topology):
log.info("breaking out of initial heartbeat")
break
# ================
# Heartbeat Stats
# ================