airflow-supervisor

Run and monitor supervisord-managed jobs from Apache Airflow.

Build Status codecov License PyPI

from airflow import DAG
from airflow_supervisor import ProgramConfiguration, Supervisor, SupervisorAirflowConfiguration

dag = DAG(dag_id="nightly-supervisor", schedule="@daily")
config = SupervisorAirflowConfiguration(
    working_dir="/var/tmp/nightly-supervisor",
    program={
        "nightly": ProgramConfiguration(command="python /opt/jobs/nightly.py"),
    },
)
Supervisor(dag=dag, cfg=config)

The generated lifecycle creates a dedicated supervisord instance, starts and monitors programs with airflow-ha, handles retriggers, and optionally stops and removes the instance. SupervisorSSH manages the same lifecycle remotely.

Documentation

Published documentation is available at airflow-laminar.github.io/airflow-supervisor.

Ecosystem

Note

This library was generated using copier from the Base Python Project Template repository.

Install the Python Templates Copier Update GitHub App to receive weekly template update pull requests.