From 44cdf60feb88fd38ce1011a5d732321414a77b37 Mon Sep 17 00:00:00 2001 From: Stephen Diehl Date: Thu, 5 Jul 2012 13:47:43 -0400 Subject: [PATCH] Minor fix, lots of win. --- zipline/core/component.py | 3 ++- zipline/core/monitor.py | 4 ++-- zipline/lines.py | 1 - 3 files changed, 4 insertions(+), 4 deletions(-) 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()