diff --git a/zipline/components/aggregator.py b/zipline/components/aggregator.py index cc589789..6eb99fe9 100644 --- a/zipline/components/aggregator.py +++ b/zipline/components/aggregator.py @@ -92,7 +92,7 @@ class Aggregate(Component): try: self.append(event) - if not (self.is_full() or self.draining): + if self.is_full() or self.draining: event = self.next() if event: diff --git a/zipline/components/tradesimulation.py b/zipline/components/tradesimulation.py index 8452be49..eacae981 100644 --- a/zipline/components/tradesimulation.py +++ b/zipline/components/tradesimulation.py @@ -176,9 +176,7 @@ class TradeSimulationClient(Component): record.extra['algo_dt'] = self.current_dt data_injector = Processor(inject_event_data) - log_pipeline = NestedSetup([self.zmq_out, - #e.g. FileHandler(...) - data_injector]) + log_pipeline = NestedSetup([self.zmq_out,data_injector]) with log_pipeline.threadbound(), self.stdout_capture(self.logger, ''): self.algorithm.handle_data(data) # if no log socket, just run the algo normally