Created
July 12, 2014 03:26
-
-
Save harlowja/d5c536de8d8f72377760 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 taskflow.types import fsm | |
from taskflow import states as st | |
m = fsm.FSM(st.UNDEFINED) | |
m.add_state(st.UNDEFINED) | |
m.add_state(st.RESUMING) | |
m.add_state(st.REVERTED) | |
m.add_state(st.SCHEDULING) | |
m.add_state(st.SUCCESS) | |
m.add_state(st.SUSPENDED) | |
m.add_state(st.WAITING) | |
m.add_state(st.ANALYZING) | |
m.add_transition(st.UNDEFINED, st.RESUMING, 'start', None, None) | |
m.reset() | |
print(m.pformat()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment