Health Policy

class ska_csp_lmc_common.supervision.health.health_policy.HealthDecision(immediate: bool = False)

Bases: object

Decision output for health supervision timing.

class ska_csp_lmc_common.supervision.health.health_policy.HealthEvaluationPolicy

Bases: object

Decide whether an incoming event should force immediate evaluation.

immediate_for_sample(sample: ComponentSnapshot) bool

Return whether one component update should bypass debounce.

Parameters:

sample – Health sample for the updated component.

Returns:

True when the update should trigger immediate evaluation.

immediate_for_snapshot(snap: Dict[str, ComponentSnapshot]) bool

Return whether any sample in a snapshot requires immediate eval.

Parameters:

snap – Current snapshot mapping fqdn -> HealthSample.

Returns:

True when any sample requires immediate evaluation.