INNER CODE UNIT · Python
_secho_workflow_status
flyteorg/flytekit · flytekit/clis/flyte_cli/main.py:139
def _secho_workflow_status(status, nl=True):
red_phases = {
_core_execution_models.WorkflowExecutionPhase.FAILED,
_core_execution_models.WorkflowExecutionPhase.ABORTED,
_core_execution_models.WorkflowExecutionPhase.FAILING,
_core_execution_models.WorkflowExecutionPhase.TIMED_OUT,
}
yellow_phases = {
_core_execution_models.WorkflowExecutionPhase.QUEUED,
_core_execution_models.WorkflowExecutionPhase.UNDEFINED,
}
green_phases = {
_core_execution_models.WorkflowExecutionPhase.SUCCEEDED,
_core_execution_models.WorkflowExecutionPhase.SUCCEEDING,
}
if status in red_phases:
fg = "red"
elif status in yellow_phases: