issue #155: move connection factories to parent.py.

pull/167/head
David Wilson 7 years ago
parent 972f77c6b5
commit cba3347556

@ -669,21 +669,6 @@ class Router(mitogen.parent.Router):
self.broker.shutdown()
self.broker.join()
def docker(self, **kwargs):
return self.connect('docker', **kwargs)
def local(self, **kwargs):
return self.connect('local', **kwargs)
def fork(self, **kwargs):
return self.connect('fork', **kwargs)
def sudo(self, **kwargs):
return self.connect('sudo', **kwargs)
def ssh(self, **kwargs):
return self.connect('ssh', **kwargs)
def disconnect_stream(self, stream):
self.broker.defer(stream.on_disconnect, self.broker)

@ -615,6 +615,8 @@ class RouteMonitor(object):
class Router(mitogen.core.Router):
context_class = Context
debug = False
profiling = False
id_allocator = None
responder = None
@ -710,6 +712,21 @@ class Router(mitogen.core.Router):
self._context_by_id[context.context_id] = context
return context
def docker(self, **kwargs):
return self.connect('docker', **kwargs)
def local(self, **kwargs):
return self.connect('local', **kwargs)
def fork(self, **kwargs):
return self.connect('fork', **kwargs)
def sudo(self, **kwargs):
return self.connect('sudo', **kwargs)
def ssh(self, **kwargs):
return self.connect('ssh', **kwargs)
class ProcessMonitor(object):
def __init__(self):

Loading…
Cancel
Save