File Sensors¶
-
class
airflow_plugins.operators.sensors.file_sensor.
FileSensor
(path, modified=None, notify_after=28800, notify_delta=3600, conn_id=None, *args, **kwargs)[source]¶ Check file presence on hook
-
class
airflow_plugins.operators.sensors.task_sensor.
TaskRuntimeSensor
(notify_after, notify_delta=3600, start_wait=0, dag_ids=None, task_ids=None, operator_ids=None, include_subdags=True, check_execution_time=True, *args, **kwargs)[source]¶ Checks whether particular tasks are still running after a period of time and notify about them if so
Parameters: - notify_after (int (or timedelta)) – Start sending notifications after given number of seconds (of runtime)
- notify_delta (int (or timedelta)) – Time interval between successive notifications in seconds, defaults to one hour (60*60 seconds)
- start_wait (int (or timedelta)) – Wait at start for at least given number of seconds for tasks to be registered (set if this op runs continuously)
- dag_ids (list) – List of dag_ids determining target task instances, can be set as a mask (e.g. “kiwi_master” for all kiwi master dags)
- task_ids (list) – List of task_ids determining target task instances
- operator_ids (list) – List of operators determining target task instances
- include_subdags (bool) – Whether to include subdags of target dags (dag_ids) (i.e. “kiwi_master” to also match “kiwi_master.storyteller” tasks), default True (always True if dag_ids not set)
- check_execution_time (bool) – Whether to check task instance execution time, or wall clock time (time elapsed from midnight), default True