def print_summary(self): print("--- Server command ---") print("> {}".format(_plano.read(self.command_file)), end="") print("--- Server output ---") for line in _plano.read_lines(self.output_file): print("> {}".format(line), end="")
def start(self, port): assert self.proc is None _plano.make_dir(self.output_dir) self.output = open(self.output_file, "w") command = [ "quiver-server", "//localhost:{}/q0".format(port), "--impl", self.impl, "--ready-file", self.ready_file, "--verbose", ] _plano.write(self.command_file, "{}\n".format(" ".join(command))) self.proc = _plano.start_process(command, stdout=self.output, stderr=self.output) for i in range(30): if _plano.read(self.ready_file) == "ready\n": break _plano.sleep(0.2) else: raise _Timeout("Timed out waiting for server to be ready")
def start(self, port): assert self.proc is None _plano.make_dir(self.output_dir) self.output = open(self.output_file, "w") command = [ "quiver-server", "//127.0.0.1:{}/q0".format(port), "--impl", self.impl, "--ready-file", self.ready_file, "--verbose", ] _plano.write(self.command_file, "{}\n".format(" ".join(command))) self.proc = _plano.start_process(command, stdout=self.output, stderr=self.output) for i in range(30): if _plano.read(self.ready_file) == "ready\n": break _plano.sleep(0.2) else: raise _Timeout("Timed out waiting for server to be ready")