mirror of
https://github.com/wassname/catalyst.git
synced 2026-07-12 04:22:56 +08:00
Temporary commit.
This commit is contained in:
@@ -27,8 +27,6 @@ def do_handle_control_events(cls, poller):
|
||||
# If we're in devel mode drop out because the controller
|
||||
# isn't guaranteed to be around anymore
|
||||
if cls.devel:
|
||||
import logbook
|
||||
logbook.info("Dropping out")
|
||||
return
|
||||
|
||||
if poller.get(cls.control_in) == zmq.POLLIN:
|
||||
|
||||
+9
-6
@@ -114,7 +114,7 @@ class SimulatedTrading(object):
|
||||
self.trading_environment = config['trading_environment']
|
||||
self.sim_style = config.get('simulation_style')
|
||||
|
||||
self.devel = config['devel']
|
||||
self.devel = config.get('devel', False)
|
||||
|
||||
self.leased_sockets = []
|
||||
self.sim_context = None
|
||||
@@ -272,11 +272,11 @@ class SimulatedTrading(object):
|
||||
zipline.add_source(trade_source)
|
||||
|
||||
# Save us from needless debugging
|
||||
inside_test = 'nose' in inspect.stack()[-1][1]
|
||||
if inside_test and not config.get('devel', False):
|
||||
assert False, """
|
||||
You need to run the SimulatedTrading inside a test with devel=True
|
||||
"""
|
||||
#inside_test = 'nose' in inspect.stack()[-1][1]
|
||||
#if inside_test and not config.get('devel', False):
|
||||
#assert False, """
|
||||
#You need to run the SimulatedTrading inside a test with devel=True
|
||||
#"""
|
||||
|
||||
return zipline
|
||||
|
||||
@@ -393,6 +393,9 @@ class SimulatedTrading(object):
|
||||
thread.join()
|
||||
else:
|
||||
self.controller_process.join()
|
||||
import pdb; pdb.set_trace()
|
||||
for process in self.sim.subprocesses:
|
||||
process.join()
|
||||
|
||||
@property
|
||||
def is_success(self):
|
||||
|
||||
Reference in New Issue
Block a user