diff --git a/zipline/core/monitor.py b/zipline/core/monitor.py index 11b91fa8..1767958d 100644 --- a/zipline/core/monitor.py +++ b/zipline/core/monitor.py @@ -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 # ================