Created
June 23, 2016 06:57
-
-
Save tehasdf/7d1b8a02606fad44ba70e63ce2b8deb5 to your computer and use it in GitHub Desktop.
This file contains 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.decorators import workflow, operation | |
from cloudify.workflows import ctx as workflow_ctx | |
@operation | |
def sometask(ctx): | |
ctx.logger.info('ok {0}'.format(ctx)) # ctx is a CloudifyContext, not a WorkflowContext | |
@workflow | |
def updatenow(**_): | |
'''Run update-now''' | |
workflow_ctx.logger.info('Executing "updatenow" workflow {0!r}'.format(_)) | |
workflow_ctx.execute_task('foo.sometask') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment