Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create an Enum that specifies the available triggers #21

Open
thedrow opened this issue Jan 20, 2021 · 0 comments · May be fixed by #35
Open

Create an Enum that specifies the available triggers #21

thedrow opened this issue Jan 20, 2021 · 0 comments · May be fixed by #35
Assignees
Milestone

Comments

@thedrow
Copy link
Member

thedrow commented Jan 20, 2021

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()
@thedrow thedrow added this to the v0.1 milestone Jan 20, 2021
@thedrow thedrow linked a pull request Mar 15, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants