summaryrefslogtreecommitdiff
path: root/taskflow/engines/action_engine/engine.py
diff options
context:
space:
mode:
authorJoshua Harlow <jxharlow@godaddy.com>2016-06-10 17:35:01 -0700
committerChangBo Guo(gcb) <glongwave@gmail.com>2017-01-03 06:37:57 +0000
commit774d59813417a945fdbe50316786effd1203e8f7 (patch)
treefcf0225f05135e955cf1ccaf397b347fc41f26cf /taskflow/engines/action_engine/engine.py
parentdc15edc8423ea81120f0007938a66b46f2ab9b0f (diff)
downloadtaskflow-774d59813417a945fdbe50316786effd1203e8f7.tar.gz
Rename engine analyzer to be named selector
This moves out the engine next to run (or revert) selection process to a single class that just does this and moves out the common functions the analyzer class provided to the runtime object (which all components can access). This makes it easier to adjust the selection algorithm in different ways. Change-Id: I091c69297a7bff60729791d3ca6c3fae14d6eea5
Diffstat (limited to 'taskflow/engines/action_engine/engine.py')
-rw-r--r--taskflow/engines/action_engine/engine.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/taskflow/engines/action_engine/engine.py b/taskflow/engines/action_engine/engine.py
index 8b0b99f..a1d1fc0 100644
--- a/taskflow/engines/action_engine/engine.py
+++ b/taskflow/engines/action_engine/engine.py
@@ -375,8 +375,8 @@ class ActionEngine(base.Engine):
def _ensure_storage(self):
"""Ensure all contained atoms exist in the storage unit."""
self.storage.ensure_atoms(
- self._runtime.analyzer.iterate_nodes(compiler.ATOMS))
- for atom in self._runtime.analyzer.iterate_nodes(compiler.ATOMS):
+ self._runtime.iterate_nodes(compiler.ATOMS))
+ for atom in self._runtime.iterate_nodes(compiler.ATOMS):
if atom.inject:
self.storage.inject_atom_args(atom.name, atom.inject,
transient=self._inject_transient)
@@ -402,7 +402,7 @@ class ActionEngine(base.Engine):
last_cause = None
last_node = None
missing_nodes = 0
- for atom in self._runtime.analyzer.iterate_nodes(compiler.ATOMS):
+ for atom in self._runtime.iterate_nodes(compiler.ATOMS):
exec_missing = self.storage.fetch_unsatisfied_args(
atom.name, atom.rebind, optional_args=atom.optional)
revert_missing = self.storage.fetch_unsatisfied_args(