diff --git a/taskflow/engines/action_engine/engine.py b/taskflow/engines/action_engine/engine.py index 21bdb279..6d9ee264 100644 --- a/taskflow/engines/action_engine/engine.py +++ b/taskflow/engines/action_engine/engine.py @@ -65,7 +65,6 @@ class ActionEngine(base.Engine): valid states in the states module to learn more about what other states the tasks and flow being ran can go through. """ - _compiler_factory = compiler.PatternCompiler NO_RERAISING_STATES = frozenset([states.SUSPENDED, states.SUCCESS]) """ @@ -79,6 +78,7 @@ class ActionEngine(base.Engine): self._runtime = None self._compiled = False self._compilation = None + self._compiler = compiler.PatternCompiler(flow) self._lock = threading.RLock() self._state_lock = threading.RLock() self._storage_ensured = False @@ -286,10 +286,6 @@ class ActionEngine(base.Engine): self._runtime.reset_all() self._change_state(states.PENDING) - @misc.cachedproperty - def _compiler(self): - return self._compiler_factory(self._flow) - @fasteners.locked def compile(self): if self._compiled: