Skip to main content

Systemd operators and configuration for long-running tasks

Project description

airflow-systemd

Systemd operators and configuration for long-running tasks

Build Status codecov License PyPI

Overview

airflow-systemd mirrors airflow-supervisor for hosts managed by systemd. It turns a SystemdAirflowConfiguration into an Airflow task lifecycle:

configure-systemd -> start-services -> check-services
                                      |             |
                                      v             v
                               restart-services  stop-services -> unconfigure-systemd

Airflow owns scheduling, so this integration runs service units directly rather than starting systemd timer units. Timer models remain available through systemd-pydantic for non-Airflow consumers.

from airflow import DAG
from airflow_systemd import ServiceConfiguration, ServiceUnitConfiguration, Systemd, SystemdAirflowConfiguration

dag = DAG(dag_id="long-running-job", schedule="@daily")
config = SystemdAirflowConfiguration(
    service={
        "long-running-job": ServiceUnitConfiguration(
            service=ServiceConfiguration(type="exec", exec_start="/opt/jobs/run"),
        )
    },
    scope="user",
)
Systemd(dag=dag, cfg=config)

The local integration supports the same Airflow-specific controls as airflow-supervisor: status interval and timeout, runtime/end-time limits, retrigger limits, pools, optional restart behavior, stop-on-exit, and cleanup.

[!NOTE] This library was generated using copier from the Base Python Project Template repository.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

airflow_systemd-0.1.0.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

airflow_systemd-0.1.0-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

Details for the file airflow_systemd-0.1.0.tar.gz.

File metadata

  • Download URL: airflow_systemd-0.1.0.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for airflow_systemd-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5579f95ba3fab1987300ab3a9a532f35d653f3ff99bc64874fdd9fa363956ed8
MD5 17fa1f2a84d4f700527fa7fce2eaa9fd
BLAKE2b-256 d18dc8e42d070fca54c16b95de28c3722e1af90d28bf726368ea41d6f7033536

See more details on using hashes here.

File details

Details for the file airflow_systemd-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for airflow_systemd-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2e83c209a2a9243a33ee4f353f12eb7b45b2178dc14ef7e16eb4102fa9103906
MD5 0e63fbb31f7424adfceeb2d45c7c808d
BLAKE2b-256 98768a8fc8e38bbb6fed3b28f744919fa30b393d2c93ec47d467c0cc7495f01c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page