def peer_env(self, mx_data): if mx_data[0] is None: return None env = os.environ.copy() addr, port = mx_data[0] _env = { "MULTIPLEXER_ADDRESSES": socket.gethostname() + ":" + str(port), "MULTIPLEXER_PASSWORD": mx_data[1], "MULTIPLEXER_RULES": launcher_tools.mx_rules_path(), } env.update(_env) return env
def peer_env(self, mx_data): if mx_data[0] is None: return None env = os.environ.copy() addr, port = mx_data[0] _env = { "MULTIPLEXER_ADDRESSES": socket.gethostname() + ':' + str(port), "MULTIPLEXER_PASSWORD": mx_data[1], "MULTIPLEXER_RULES": launcher_tools.mx_rules_path() } env.update(_env) return env
def handle_start_mx(self, message, sock): if 'mx' in self.launch_data and self.mx_data[0] is not None: self.logger.info("..starting multiplexer") self.peer_order.remove(['mx']) self.peers_to_launch.remove('mx') path = launcher_tools.mx_path() args = ['run_multiplexer', self.mx_addr_str( (('0.0.0.0', self.mx_data[0][1]), self.mx_data[1])), '--multiplexer-password', self.mx_data[1], '--rules', launcher_tools.mx_rules_path()] proc, details = self._launch_process(path, args, 'multiplexer', 'mx', env=self.env) self.processes['mx'] = proc if proc is not None: self.mx = proc
def peer_env(self, mx_data): if mx_data[0] is None: return None env = os.environ.copy() addr, port = mx_data[0] if addr == '0.0.0.0': addr = socket.gethostname() _env = { "MULTIPLEXER_ADDRESSES": addr + ':' + str(port), "MULTIPLEXER_PASSWORD": '',#mx_data[1], "MULTIPLEXER_RULES": launcher_tools.mx_rules_path() } env.update(_env) return env
def handle_start_mx(self, message, sock): if "mx" in self.launch_data and self.mx_data[0] is not None: print self.name, "[", self.type, "]", "..starting multiplexer" self.peer_order.remove(["mx"]) self.peers_to_launch.remove("mx") path = launcher_tools.mx_path() args = [ "run_multiplexer", self.mx_addr_str((("0.0.0.0", self.mx_data[0][1]), self.mx_data[1])), "--multiplexer-password", self.mx_data[1], "--rules", launcher_tools.mx_rules_path(), ] proc, details = self._launch_process(path, args, "multiplexer", "mx", env=self.env) self.processes["mx"] = proc if proc is not None: self.mx = proc