##// END OF EJS Templates
pass config obj to Scheduler as dict...
MinRK -
Show More
@@ -109,8 +109,10 b' class ControllerFactory(HubFactory):'
109
109
110 else:
110 else:
111 self.log.info("task::using Python %s Task scheduler"%self.scheme)
111 self.log.info("task::using Python %s Task scheduler"%self.scheme)
112 sargs = (self.client_info['task'][1], self.engine_info['task'], self.monitor_url, self.client_info['notification'])
112 sargs = (self.client_info['task'][1], self.engine_info['task'],
113 kwargs = dict(scheme=self.scheme,logname=self.log.name, loglevel=self.log.level, config=self.config)
113 self.monitor_url, self.client_info['notification'])
114 kwargs = dict(scheme=self.scheme,logname=self.log.name, loglevel=self.log.level,
115 config=dict(self.config))
114 q = Process(target=launch_scheduler, args=sargs, kwargs=kwargs)
116 q = Process(target=launch_scheduler, args=sargs, kwargs=kwargs)
115 q.daemon=True
117 q.daemon=True
116 children.append(q)
118 children.append(q)
@@ -34,6 +34,7 b' from zmq.eventloop import ioloop, zmqstream'
34
34
35 # local imports
35 # local imports
36 from IPython.external.decorator import decorator
36 from IPython.external.decorator import decorator
37 from IPython.config.loader import Config
37 from IPython.utils.traitlets import Instance, Dict, List, Set
38 from IPython.utils.traitlets import Instance, Dict, List, Set
38
39
39 from IPython.parallel import error
40 from IPython.parallel import error
@@ -557,9 +558,12 b' def launch_scheduler(in_addr, out_addr, mon_addr, not_addr, config=None,logname='
557 from zmq.eventloop import ioloop
558 from zmq.eventloop import ioloop
558 from zmq.eventloop.zmqstream import ZMQStream
559 from zmq.eventloop.zmqstream import ZMQStream
559
560
561 if config:
562 # unwrap dict back into Config
563 config = Config(config)
564
560 ctx = zmq.Context()
565 ctx = zmq.Context()
561 loop = ioloop.IOLoop()
566 loop = ioloop.IOLoop()
562 print (in_addr, out_addr, mon_addr, not_addr)
563 ins = ZMQStream(ctx.socket(zmq.XREP),loop)
567 ins = ZMQStream(ctx.socket(zmq.XREP),loop)
564 ins.setsockopt(zmq.IDENTITY, identity)
568 ins.setsockopt(zmq.IDENTITY, identity)
565 ins.bind(in_addr)
569 ins.bind(in_addr)
General Comments 0
You need to be logged in to leave comments. Login now