Apache Airflow provider for orchesjob – lightweight idempotent job runner
Project description
airflow-providers-orchesjob
Apache Airflow provider that runs jobs via orchesjob over SSH.
Uses Airflow's Deferrable Operator pattern — the worker slot is released while the remote job runs, and the task resumes automatically when the job reaches a terminal state.
Requirements
- Apache Airflow ≥ 2.6
apache-airflow-providers-ssh≥ 3.0orchesjobinstalled on the remote host
Installation
pip install airflow-providers-orchesjob
Setup
Create an SSH Connection in Airflow (Admin → Connections):
| Field | Value |
|---|---|
| Conn Id | my_ssh (any name) |
| Conn Type | SSH |
| Host | remote host |
| Username | SSH user |
Usage
from airflow_providers_orchesjob.operators.orchesjob import OrchesJobOperator
with DAG("my_dag", ...):
import_task = OrchesJobOperator(
task_id="daily_import",
command=["/jobs/import.sh", "--date", "{{ ds }}"],
ssh_conn_id="my_ssh",
)
Idempotency
By default, run_key is auto-generated as {dag_id}__{task_id}__{run_id},
which makes each DAG run idempotent: re-triggering the same run returns the
existing job if it is still active.
Supply an explicit run_key to control the key yourself:
OrchesJobOperator(
task_id="import",
command=["/jobs/import.sh"],
ssh_conn_id="my_ssh",
run_key="daily-import-{{ ds }}",
)
Use strict=True to prevent any re-execution with the same key, even after
the previous job has finished:
OrchesJobOperator(
...,
strict=True,
)
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
command |
list[str] |
required | Command to run on the remote host |
ssh_conn_id |
str |
required | Airflow SSH Connection ID |
run_key |
str | None |
auto | orchesjob idempotency key |
strict |
bool |
False |
Never re-run the same run_key |
poll_interval |
float |
30.0 |
Seconds between status polls |
startup_timeout |
float |
60.0 |
Seconds to wait for job to leave STARTING |
orchesjob_home |
str | None |
None |
Override ORCHESJOB_HOME on remote host |
Error Handling
| Event | Airflow behaviour |
|---|---|
Job FAILED or LOST |
AirflowException → honours task retries |
startup_timeout exceeded |
AirflowException → honours task retries |
| SSH connection failure | AirflowException → honours task retries |
Job CANCELLED |
AirflowException |
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file airflow_providers_orchesjob-0.1.2.tar.gz.
File metadata
- Download URL: airflow_providers_orchesjob-0.1.2.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d87d2e4d9765020ad425a05d19ffce3c9a45cb65bfd13bf97ba61f691eb98ee4
|
|
| MD5 |
2cb03ba2ee9ed8d2036b28301d96bcd3
|
|
| BLAKE2b-256 |
ddf121eec6f5d81f806f05173656f590a74c40173378d5611317efd1686455db
|
File details
Details for the file airflow_providers_orchesjob-0.1.2-py3-none-any.whl.
File metadata
- Download URL: airflow_providers_orchesjob-0.1.2-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
306cba4547f7d57b77d084aaf25ed92e68ade3242792acc89567cf3d8fdaccc2
|
|
| MD5 |
6f730d804e1f7facf861dcaff5765d6d
|
|
| BLAKE2b-256 |
7b510dd350699175734e8d59b920723829e6bbaecd6a4e79ef33957230cd8c10
|