airflow_ha.HighAvailabilityOperatorMixin

class airflow_ha.HighAvailabilityOperatorMixin(python_callable: Callable[[...], Tuple[Result, Action]], pass_trigger_kwargs: Dict[str, Any] | None = None, fail_trigger_kwargs: Dict[str, Any] | None = None, **kwargs)[source]

Bases: object

__init__(python_callable: Callable[[...], Tuple[Result, Action]], pass_trigger_kwargs: Dict[str, Any] | None = None, fail_trigger_kwargs: Dict[str, Any] | None = None, **kwargs) None[source]

The HighAvailabilityOperator is an Airflow Meta-Operator for long-running or “always-on” tasks.

It resembles a BranchPythonOperator with the following predefined set of outcomes:

check -> decide -> PASS/RETRIGGER

-> PASS/STOP -> FAIL/RETRIGGER -> FAIL/STOP -> */CONTINUE

Any setup should be state-aware (e.g. don’t just start a process, check if it is currently started first).

Methods

__init__(python_callable[, ...])

The HighAvailabilityOperator is an Airflow Meta-Operator for long-running or "always-on" tasks.

Attributes

retrigger_fail

retrigger_pass

stop_fail

stop_pass