예제 #1
0
def _run(run, op, quiet, stop_after, extra_env):
    try:
        _resolve_deps(op, run)
    finally:
        op_util.clear_run_pending(run)
    op_util.set_run_started(run)
    op_util.clear_run_marker(run, "STAGED")
    proc = _op_start_proc(op, run, extra_env)
    exit_status = _op_wait_for_proc(op, proc, run, quiet, stop_after)
    _op_finalize_run_attrs(run, exit_status)
    return exit_status
예제 #2
0
파일: op.py 프로젝트: olliethomas/guildai
def run(op, quiet=False, pidfile=None, stop_after=None, extra_env=None):
    run = init_run(op)
    op_util.clear_run_marker(run, "STAGED")
    try:
        _resolve_deps(op, run)
    finally:
        op_util.clear_run_pending(run)
    op_util.set_run_started(run)
    if pidfile:
        _run_op_in_background(run, op, pidfile, quiet, stop_after, extra_env)
        return run, 0
    else:
        exit_status = _run_op(run, op, quiet, stop_after, extra_env)
        return run, exit_status