def __init__(self, workflow_data, config):
self.config = config
# Initialize
self.graph = nx.MultiDiGraph()
# Workflow dictionary
self.workflow = workflow_data
# Construct graph
self._build_initial_workflow_graph()
self._build_privacy_restrictions()
# Topological sorted tasks according to their dependencies
self.sorted_tasks = []
# Spark or COMPSs
self.platform = workflow_data.get('platform', {}).get('slug', 'spark')
# Verify null edges to topological_sorted_tasks
if self.is_there_null_target_id_tasks() \
and self.is_there_null_source_id_tasks():
self.sorted_tasks = self.get_topological_sorted_tasks()
else:
raise AttributeError(
_("Port '{}/{}' must be informed for operation{}").format(
self.WORKFLOW_GRAPH_SOURCE_ID_PARAM,
self.WORKFLOW_GRAPH_TARGET_ID_PARAM,
self.__class__))
评论列表
文章目录