parent
1b3384b7bd
commit
7b82c6bb27
|
@ -14,18 +14,8 @@ class NodeManager(object):
|
||||||
self.gwmanager = GatewayManager(specs)
|
self.gwmanager = GatewayManager(specs)
|
||||||
self.nodes = []
|
self.nodes = []
|
||||||
|
|
||||||
def makegateways(self):
|
def trace(self, msg):
|
||||||
# we change to the topdir sot that
|
self.config.bus.notify("trace", "nodemanage", msg)
|
||||||
# PopenGateways will have their cwd
|
|
||||||
# such that unpickling configs will
|
|
||||||
# pick it up as the right topdir
|
|
||||||
# (for other gateways this chdir is irrelevant)
|
|
||||||
old = self.config.topdir.chdir()
|
|
||||||
try:
|
|
||||||
self.gwmanager.makegateways()
|
|
||||||
finally:
|
|
||||||
old.chdir()
|
|
||||||
self.trace_nodestatus()
|
|
||||||
|
|
||||||
def trace_nodestatus(self):
|
def trace_nodestatus(self):
|
||||||
if self.config.option.debug:
|
if self.config.option.debug:
|
||||||
|
@ -60,8 +50,19 @@ class NodeManager(object):
|
||||||
# and cd into it
|
# and cd into it
|
||||||
self.gwmanager.multi_chdir(self.config.topdir.basename, inplacelocal=False)
|
self.gwmanager.multi_chdir(self.config.topdir.basename, inplacelocal=False)
|
||||||
|
|
||||||
def trace(self, msg):
|
def makegateways(self):
|
||||||
self.config.bus.notify("trace", "nodemanage", msg)
|
# we change to the topdir sot that
|
||||||
|
# PopenGateways will have their cwd
|
||||||
|
# such that unpickling configs will
|
||||||
|
# pick it up as the right topdir
|
||||||
|
# (for other gateways this chdir is irrelevant)
|
||||||
|
old = self.config.topdir.chdir()
|
||||||
|
try:
|
||||||
|
self.gwmanager.makegateways()
|
||||||
|
finally:
|
||||||
|
old.chdir()
|
||||||
|
self.trace_nodestatus()
|
||||||
|
|
||||||
|
|
||||||
def setup_nodes(self, putevent):
|
def setup_nodes(self, putevent):
|
||||||
self.rsync_roots()
|
self.rsync_roots()
|
||||||
|
|
Loading…
Reference in New Issue