Skip to main content

GetPhaseFromConditions

Extracts the phase from TaskAction conditions.

def GetPhaseFromConditions(
taskAction: *executorv1.TaskAction
) - > common.ActionPhase

Extracts the phase from TaskAction conditions. This function iterates through the conditions of a TaskAction to determine its current operational phase, providing a standardized status based on the condition types and reasons.

Parameters​

NameTypeDescription
taskAction*executorv1.TaskActionThe TaskAction object containing status conditions from which to extract the phase.

Returns​

TypeDescription
common.ActionPhaseThe determined action phase (e.g., SUCCEEDED, FAILED, QUEUED, INITIALIZING, RUNNING, or UNSPECIFIED if no matching condition is found).