diff options
| author | Joshua Harlow <harlowja@gmail.com> | 2014-09-16 22:46:39 -0700 |
|---|---|---|
| committer | Joshua Harlow <harlowja@gmail.com> | 2014-10-18 13:28:27 -0700 |
| commit | d433a5323ff4fbf1d973ca7605ac62819c19039a (patch) | |
| tree | 92ddb70cf7bfa8edb6eb63891b8a4feb8ab634ac /taskflow/examples/create_parallel_volume.py | |
| parent | 371068dd1f4b268d7e1a8648f44e5f56f9ef7f4e (diff) | |
| download | taskflow-d433a5323ff4fbf1d973ca7605ac62819c19039a.tar.gz | |
Deprecate `engine_conf` and prefer `engine` instead
To avoid having one set of options coming from `engine_conf`
and another set of options coming from `kwargs` and another set
coming from `engine_conf` if it is a URI just start to shift
toward `engine_conf` being deprecated and `engine` being a string
type only (or a URI with additional query parameters) and having
any additional **kwargs that are provided just get merged into the
final engine options.
This adds a new helper function that handles all these various
options and adds in a keyword argument `engine` that will be shifted
to in a future version (in that future version we can also then
remove the `engine_conf` and just stick to a smaller set of option
mechanisms).
It also adjusts all examples to use this new and more easier to
understand format and adjusts tests, conductor interface to use
this new more easily understandable style of getting an engine.
Change-Id: Ic7617057338e0c63775cf38a24643cff6e454950
Diffstat (limited to 'taskflow/examples/create_parallel_volume.py')
| -rw-r--r-- | taskflow/examples/create_parallel_volume.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/taskflow/examples/create_parallel_volume.py b/taskflow/examples/create_parallel_volume.py index de511ad..5185330 100644 --- a/taskflow/examples/create_parallel_volume.py +++ b/taskflow/examples/create_parallel_volume.py @@ -64,13 +64,9 @@ VOLUME_COUNT = 5 # time difference that this causes. SERIAL = False if SERIAL: - engine_conf = { - 'engine': 'serial', - } + engine = 'serial' else: - engine_conf = { - 'engine': 'parallel', - } + engine = 'parallel' class VolumeCreator(task.Task): @@ -106,7 +102,7 @@ for i in range(0, VOLUME_COUNT): # Show how much time the overall engine loading and running takes. with show_time(name=flow.name.title()): - eng = engines.load(flow, engine_conf=engine_conf) + eng = engines.load(flow, engine=engine) # This context manager automatically adds (and automatically removes) a # helpful set of state transition notification printing helper utilities # that show you exactly what transitions the engine is going through |
