diff options
Diffstat (limited to 'taskflow/engines')
-rw-r--r-- | taskflow/engines/action_engine/engine.py | 4 | ||||
-rw-r--r-- | taskflow/engines/base.py | 7 | ||||
-rw-r--r-- | taskflow/engines/worker_based/engine.py | 3 |
3 files changed, 2 insertions, 12 deletions
diff --git a/taskflow/engines/action_engine/engine.py b/taskflow/engines/action_engine/engine.py index 51df569..b40c5fd 100644 --- a/taskflow/engines/action_engine/engine.py +++ b/taskflow/engines/action_engine/engine.py @@ -28,7 +28,6 @@ from taskflow.engines.action_engine import runtime from taskflow.engines import base from taskflow import exceptions as exc from taskflow import states -from taskflow import storage as atom_storage from taskflow.types import failure from taskflow.utils import lock_utils from taskflow.utils import misc @@ -218,7 +217,6 @@ class ActionEngine(base.Engine): class SerialActionEngine(ActionEngine): """Engine that runs tasks in serial manner.""" - _storage_factory = atom_storage.SingleThreadedStorage def __init__(self, flow, flow_detail, backend, options): super(SerialActionEngine, self).__init__(flow, flow_detail, @@ -276,8 +274,6 @@ String (case insensitive) Executor used .. |cf| replace:: concurrent.futures """ - _storage_factory = atom_storage.MultiThreadedStorage - # One of these types should match when a object (non-string) is provided # for the 'executor' option. # diff --git a/taskflow/engines/base.py b/taskflow/engines/base.py index a97cf3b..7ea8e70 100644 --- a/taskflow/engines/base.py +++ b/taskflow/engines/base.py @@ -19,6 +19,7 @@ import abc import six +from taskflow import storage from taskflow.types import notifier from taskflow.utils import deprecation from taskflow.utils import misc @@ -74,11 +75,7 @@ class Engine(object): @misc.cachedproperty def storage(self): """The storage unit for this flow.""" - return self._storage_factory(self._flow_detail, self._backend) - - @abc.abstractproperty - def _storage_factory(self): - """Storage factory that will be used to generate storage objects.""" + return storage.Storage(self._flow_detail, backend=self._backend) @abc.abstractmethod def compile(self): diff --git a/taskflow/engines/worker_based/engine.py b/taskflow/engines/worker_based/engine.py index aee39e8..31dcade 100644 --- a/taskflow/engines/worker_based/engine.py +++ b/taskflow/engines/worker_based/engine.py @@ -17,7 +17,6 @@ from taskflow.engines.action_engine import engine from taskflow.engines.worker_based import executor from taskflow.engines.worker_based import protocol as pr -from taskflow import storage as t_storage class WorkerBasedActionEngine(engine.ActionEngine): @@ -46,8 +45,6 @@ class WorkerBasedActionEngine(engine.ActionEngine): (see: :py:attr:`~.proxy.Proxy.DEFAULT_RETRY_OPTIONS`) """ - _storage_factory = t_storage.SingleThreadedStorage - def __init__(self, flow, flow_detail, backend, options): super(WorkerBasedActionEngine, self).__init__(flow, flow_detail, backend, options) |