add docs for states.

add docs explaining what each state mean.

Change-Id: I0092473c3be7f5ef5a28532984ebbe753434becb
This commit is contained in:
amassalh 2018-07-05 13:44:39 +00:00 committed by ayyob
parent aa7b5d9fc0
commit 259d8a8099
1 changed files with 20 additions and 1 deletions

View File

@ -15,15 +15,34 @@
"""Valid task and workflow states."""
# TODO(rakhmerov): need docs explaining what each state means.
IDLE = 'IDLE'
"""Task is not started yet."""
WAITING = 'WAITING'
"""
Task execution object has been created, but it is not ready to start because
some preconditions are not met.
NOTE:
The task may never run just because some of the preconditions may never be met.
"""
RUNNING = 'RUNNING'
"""Task, action or workflow is currently being executed."""
RUNNING_DELAYED = 'DELAYED'
"""Task is in the running state but temporarily delayed."""
PAUSED = 'PAUSED'
"""Task, action or workflow has been paused."""
SUCCESS = 'SUCCESS'
"""Task, action or workflow has finished successfully."""
CANCELLED = 'CANCELLED'
"""Task, action or workflow has been cancelled."""
ERROR = 'ERROR'
"""Task, action or workflow has finished with an error."""
_ALL = [
IDLE,