Created
May 17, 2016 19:25
-
-
Save dankilman/4cccd155cbffcec9a68291497e2c09da to your computer and use it in GitHub Desktop.
update improvement
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from cloudify import ctx | |
@operation | |
def some_op(**kwargs): | |
# do wonderful things | |
def handler(current_runtime_properties): | |
# make modification | |
current_runtime_properties.setdefault('prop', []).append('some_value') | |
# The implementation will take care of retrying the handler specifically when a ConflictError occurs | |
ctx.instance.update(update_handler=handler) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment