Supervisor operators and configuration for long-running tasks
Actively maintained. Last release 2 weeks ago, commits in 22 of the last 26 weeks. A safe choice.
pip install airflow-supervisorREADME as published on PyPI with version 1.13.2.
airflow-supervisor
Run and monitor supervisord-managed jobs from Apache Airflow.
Manage a dedicated supervisord instance on an Airflow worker or an SSH host.
Define its programs directly in a Python DAG or in airflow-config YAML.
from datetime import datetime, timezone
from airflow import DAG
from airflow_supervisor import ProgramConfiguration, Supervisor, SupervisorAirflowConfiguration
with DAG(
dag_id="nightly-supervisor",
schedule="@daily",
start_date=datetime(2025, 1, 1, tzinfo=timezone.utc),
catchup=False,
) as dag:
supervisor = Supervisor(
dag=dag,
cfg=SupervisorAirflowConfiguration(
working_dir="/var/tmp/nightly-supervisor",
port="127.0.0.1:9001",
program={"nightly": ProgramConfiguration(command="/bin/sleep 5")},
),
)
The lifecycle writes configuration, starts supervisord and its programs, monitors
program state with airflow-ha, and stops and removes the instance on successful
completion. SupervisorSSH runs configuration and daemon commands over SSH;
program control and checks use the remote XML-RPC endpoint.
Documentation
Start with the tutorial to run a self-contained local job and check its cleanup. For an existing deployment, choose a how-to guide:
| Execution | Inline Python |
|---|