def Outputs(running_info): if isinstance(running_info, Future): # Create the correct information from the future rinfo = RunningInfo(RunningType.PROCESS, running_info.pid) return _Action( rinfo, get_object_string(_get_proc_outputs_from_registry)) elif running_info.type == RunningType.PROCESS or running_info.type == RunningType.LEGACY_CALC: return _Action( running_info, get_object_string(_get_proc_outputs_from_registry)) elif running_info.type is RunningType.LEGACY_WORKFLOW: return _Action( running_info, get_object_string(_get_wf_outputs))
def Outputs(running_info): """ Convenience proxy function to allow returning the outputs generated by a process """ if isinstance(running_info, Future): # Create the correct information from the future rinfo = RunningInfo(RunningType.PROCESS, running_info.pid) return Action(rinfo, get_object_string(_get_proc_outputs_from_registry)) elif running_info.type == RunningType.PROCESS: return Action(running_info, get_object_string(_get_proc_outputs_from_registry)) elif running_info.type == RunningType.LEGACY_CALC: return Action(running_info, get_object_string(_get_proc_outputs_from_registry)) elif running_info.type is RunningType.LEGACY_WORKFLOW: return Action(running_info, get_object_string(_get_wf_outputs))
def Wf(running_info): """ Creates an Action tuple based on a RunningInfo tuple for a legacy Workflow node :param running_info: RunningInfo tuple :returns: Action tuple """ return Action(running_info, get_object_string(load_workflow))
def Calc(running_info): """ Creates an Action tuple based on a RunningInfo tuple for a legacy calculation node :param running_info: RunningInfo tuple :returns: Action tuple """ return Action(running_info, get_object_string(load_node))
def Wf(running_info): return _Action( running_info, get_object_string(load_workflow))
def Calc(running_info): return _Action(running_info, get_object_string(load_node))