airflow.providers.ssh.triggers.ssh_remote_job¶
SSH Remote Job Trigger for deferrable execution.
Classes¶
Trigger that monitors a remote SSH job and streams logs. |
Module Contents¶
- class airflow.providers.ssh.triggers.ssh_remote_job.SSHRemoteJobTrigger(ssh_conn_id, remote_host, job_id, job_dir, log_file, exit_code_file, remote_os, poll_interval=5, log_chunk_size=65536, log_offset=0, command_timeout=30.0)[source]¶
Bases:
airflow.triggers.base.BaseTriggerTrigger that monitors a remote SSH job and streams logs.
This trigger polls the remote host to check job completion status and reads log output incrementally.
- Parameters:
ssh_conn_id (str) – SSH connection ID from Airflow Connections
remote_host (str | None) – Optional override for the remote host
job_id (str) – Unique identifier for the remote job
job_dir (str) – Remote directory containing job artifacts
log_file (str) – Path to the log file on the remote host
exit_code_file (str) – Path to the exit code file on the remote host
remote_os (Literal['posix', 'windows']) – Operating system of the remote host (‘posix’ or ‘windows’)
poll_interval (int) – Seconds between polling attempts
log_chunk_size (int) – Maximum bytes to read per poll
log_offset (int) – Current byte offset in the log file