Skip to content

Create an Enum that specifies the available triggers #21

Description

@thedrow

Currently, we use strings as the trigger names.
We can use an Enum which specifies the list of available triggers for the state machine and use it in our codebase.

Example:

class ActorStateMachineTriggers(str, Enum):
    def _generate_next_value_(name, *args):
        return name.lower()

    initialize = auto()
    start = auto()
    stop = auto()
    restart = auto()
    report_error = auto()

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions