def run(service): try: chdir(get_path("%s.py" % service, "services")) except Exception: raise RuntimeError(_SERVICE_PY) else: exe(_SERVICE_EX % (service, get_loc()))
def test(service): try: chdir(get_path("test_%s.py" % service, "tests")) except Exception: raise RuntimeError(_SERVICE_TS) else: return exe("py.test").returncode
def halt(service): comm_ps = ["ps", "ax"] comm_nameko = ["grep", "nameko run %s" % service] comm_python = ["grep", "python"] try: p_all = Popen(comm_ps, stdout=PIPE) p_rpc = Popen(comm_nameko, stdin=p_all.stdout, stdout=PIPE) p_result = Popen(comm_python, stdin=p_rpc.stdout, stdout=PIPE) p_all.stdout.close() p_rpc.stdout.close() proc = p_result.communicate()[0] if proc: pid = int(get_first(proc)) exe("kill %s" % pid) except: raise RuntimeError("Error: cannot kill %s." % service)
def test(service): chdir(get_path("test_%s.py" % service, "tests")) exe("py.test")
def run(service): chdir(get_path("%s.py" % service, "services")) exe("nameko run %s --config %s" % ( service, get_loc()) )
def test(service): return exe("py.test", get_path("test_%s.py" % service, "tests")).returncode
def run(service): exe(_SERVICE_EX % (service, get_loc()), get_path("%s.py" % service, "services"))
def main(args): exe("make trans")
def main(args): exe("oc %s %s %s" % (args.directory, args.outfile, args.infile))