diff --git a/zipline/core/component.py b/zipline/core/component.py index dc73fc2d..27fbe9ed 100644 --- a/zipline/core/component.py +++ b/zipline/core/component.py @@ -29,7 +29,7 @@ log = logbook.Logger('Component') from zipline.exceptions import ComponentNoInit from zipline.transitions import WorkflowMeta -# LOGBOOK - embed PID in log output +log = logbook.Logger('Base') class Component(object): @@ -219,6 +219,7 @@ class Component(object): self.loop() self.shutdown() + log.info("Shutdown %r" % self) self.stop_tic = time.time() diff --git a/zipline/core/monitor.py b/zipline/core/monitor.py index e31c4f6a..fb9c7249 100644 --- a/zipline/core/monitor.py +++ b/zipline/core/monitor.py @@ -631,11 +631,11 @@ class Controller(object): self.alive = False - if hard: + if hard and not self.devel: self.state = CONTROL_STATES.TERMINATE log.info('Hard Shutdown') - if soft: + if soft and not self.devel: self.state = CONTROL_STATES.TERMINATE log.info('Soft Shutdown') self.send_softkill() diff --git a/zipline/lines.py b/zipline/lines.py index de9176f6..74bc7626 100644 --- a/zipline/lines.py +++ b/zipline/lines.py @@ -392,7 +392,6 @@ class SimulatedTrading(object): #print 'Waiting on %r' % thread thread.join() else: - self.controller_process.join() for process in self.sim.subprocesses: process.join()