示例#1
0
def run(service):
    try:
        chdir(get_path("%s.py" % service, "services"))
    except Exception:
        raise RuntimeError(_SERVICE_PY)
    else:
        exe(_SERVICE_EX % (service, get_loc()))
示例#2
0
def run(service):
    chdir(get_path("%s.py" % service, "services"))
    exe("nameko run %s --config %s" % (
        service, get_loc())
        )
示例#3
0
def run(service):
    exe(_SERVICE_EX % (service, get_loc()),
        get_path("%s.py" % service, "services"))
示例#4
0
def change_lang(lang='zh'):
    loc = 'i18n'
    i18n_loc = get_loc(loc, False)
    if i18n_loc:
        loc = path.join(i18n_loc, loc)
        switch_lang(lang, loc)