From af8561963a69b93374a2a775bb2937a4c924d4cd Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Thu, 26 Dec 2013 18:10:11 -0800 Subject: [PATCH] Name the graph property the same as in engine In order to keep consistency between the engine properties and the analyzer/decider properties we should try to keep the naming the same (in this case they both return the execution_graph). Change-Id: I981d13c68ab597a91dadea2925183674d027ce0b --- taskflow/engines/action_engine/engine.py | 2 +- taskflow/engines/action_engine/graph_analyzer.py | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/taskflow/engines/action_engine/engine.py b/taskflow/engines/action_engine/engine.py index e3f09eb6..21504648 100644 --- a/taskflow/engines/action_engine/engine.py +++ b/taskflow/engines/action_engine/engine.py @@ -98,7 +98,7 @@ class ActionEngine(base.EngineBase): @property def execution_graph(self): self.compile() - return self._analyzer.graph + return self._analyzer.execution_graph @lock_utils.locked def run(self): diff --git a/taskflow/engines/action_engine/graph_analyzer.py b/taskflow/engines/action_engine/graph_analyzer.py index 7e87197e..78ca8596 100644 --- a/taskflow/engines/action_engine/graph_analyzer.py +++ b/taskflow/engines/action_engine/graph_analyzer.py @@ -22,14 +22,17 @@ from taskflow import states as st class GraphAnalyzer(object): - """Analyzes graph to get next nodes for execution or reversion""" + """Analyzes a execution graph to get the next nodes for execution or + reversion by utilizing the graphs nodes and edge relations and comparing + the node state against the states stored in storage. + """ def __init__(self, graph, storage): self._graph = graph self._storage = storage @property - def graph(self): + def execution_graph(self): return self._graph def browse_nodes_for_execute(self, node=None):