Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Mistral Custom Actions ~ Using Base Classes
import abc
class Action(object):
@abc.abstractmethod
def run(self):
pass
class ContextAction(Action):
@abc.abstractmethod
def run(self, context):
pass
class AsyncAction(Action):
def is_sync(self):
"""Returns False if the action is asynchronous, otherwise True."""
return False
@d0ugal
Copy link

d0ugal commented Mar 9, 2017

Action would need an is_sync method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment