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