def run_task_manifest_on_cluster(path): """ Run the Task on the queue (of possible) :param path: :return: """ output_dir = os.path.dirname(path) os.chdir(output_dir) rt = RunnableTask.from_manifest_json(path) # this needs to be updated to have explicit paths to stderr, stdout rcode, err_msg, run_time = run_task_on_cluster(rt, path, output_dir, True) state = TaskStates.from_int(rcode) return state, err_msg, run_time
def run_task_manifest(path): output_dir = os.path.dirname(path) os.chdir(output_dir) stderr = os.path.join(output_dir, 'stderr') stdout = os.path.join(output_dir, 'stdout') try: rt = RunnableTask.from_manifest_json(path) except KeyError: emsg = "Unable to deserialize RunnableTask from manifest {p}".format(p=path) log.error(emsg) raise # blocking call rcode, err_msg, run_time = run_task(rt, output_dir, stdout, stderr, True) state = TaskStates.from_int(rcode) return state, err_msg, run_time