# Status is not in the model to allow usage in different models
PIPELINE_STATUS_INITIALIZING = 'initializing'
PIPELINE_STATUS_IN_PROGRESS = 'in progress'
PIPELINE_STATUS_FAILED = 'failed'
PIPELINE_STATUS_SUCCESS = 'success'

PIPELINE_STATUS_CHOICES = (
    (PIPELINE_STATUS_INITIALIZING, PIPELINE_STATUS_INITIALIZING),
    (PIPELINE_STATUS_IN_PROGRESS, PIPELINE_STATUS_IN_PROGRESS),
    (PIPELINE_STATUS_FAILED, PIPELINE_STATUS_FAILED),
    (PIPELINE_STATUS_SUCCESS, PIPELINE_STATUS_SUCCESS),
)

STEP_STATUS_NOT_STARTED = 'not started'
STEP_STATUS_IN_PROGRESS = 'in progress'
STEP_STATUS_WAITING = 'waiting'  # A step cannot proceed until some action is completed
STEP_STATUS_SKIPPED = 'skipped'  # A step is skipped due to some conditional
STEP_STATUS_FAILED = 'failed'
STEP_STATUS_SUCCESS = 'success'

STEP_STATUS_CHOICES = (
    (STEP_STATUS_NOT_STARTED, STEP_STATUS_NOT_STARTED),
    (STEP_STATUS_IN_PROGRESS, STEP_STATUS_IN_PROGRESS),
    (STEP_STATUS_WAITING, STEP_STATUS_WAITING),
    (STEP_STATUS_SKIPPED, STEP_STATUS_SKIPPED),
    (STEP_STATUS_FAILED, STEP_STATUS_FAILED),
    (STEP_STATUS_SUCCESS, STEP_STATUS_SUCCESS),
)

STEP_FINAL_STATUSES = (STEP_STATUS_SKIPPED, STEP_STATUS_FAILED, STEP_STATUS_SUCCESS)
