Skip to content

Instantly share code, notes, and snippets.

@Kami
Created August 5, 2016 10:35
Show Gist options
  • Save Kami/b4f06f94a8fddd7f8dc9b03b69a8e95a to your computer and use it in GitHub Desktop.
Save Kami/b4f06f94a8fddd7f8dc9b03b69a8e95a to your computer and use it in GitHub Desktop.
import sys
from st2actions.runners.pythonrunner import Action
class MyEchoAction(Action):
def run(self, message):
print(message)
if message == 'working'
# If value "working" is passed for parameter "message", action status will
# succeed (first item in the tuple indicates success - success flag is True)
return (True, message)
# If any other value is passed in for parameter "message", action will fail (second
# item in the tuple indicates failure - success flag is False)
return (False, message)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment