airflow-supervisor¶
Run and monitor supervisord-managed jobs from Apache Airflow.
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¶
supervisor-pydantic supplies supervisord models and lifecycle tools.
systemd-pydantic and cron-pydantic model alternative runtimes.
airflow-systemd provides the analogous systemd lifecycle.
airflow-cron converts cron jobs into ordinary Airflow tasks.
airflow-pydantic supplies declarative task, host, and connection models.
airflow-config produces YAML-driven DAGs.
Note
This library was generated using copier from the Base Python Project Template repository.