Add optional 'defer_reverts' behavior

This makes it possible to REVERT a subflow
and have it also revert the parent flow if
the parent flow doesn't have its own retry
strategy. We will probably want to make this
new behavior the default or only behavior
in a future release.

Change-Id: Iea5ac366380ba7396a87d0185703549fb0c2f825
This commit is contained in:
Greg Hill
2015-11-10 19:42:37 -06:00
committed by Joshua Harlow
parent 805ce7e909
commit cd922d4e46
8 changed files with 160 additions and 22 deletions

View File

@@ -595,3 +595,11 @@ def is_iterable(obj):
"""
return (not isinstance(obj, six.string_types) and
isinstance(obj, collections.Iterable))
def ensure_dict(obj):
"""Copy an existing dictionary or default to empty dict...."""
if not obj:
return {}
# default to a shallow copy to avoid most ownership issues
return dict(obj)