blob: 700de5ca6937cc4e08cf49767d648ea79713cdf7 [file] [log] [blame]
:py:mod:`airflow.sensors.time_delta`
====================================
.. py:module:: airflow.sensors.time_delta
Module Contents
---------------
Classes
~~~~~~~
.. autoapisummary::
airflow.sensors.time_delta.TimeDeltaSensor
airflow.sensors.time_delta.TimeDeltaSensorAsync
.. py:class:: TimeDeltaSensor(*, delta, **kwargs)
Bases: :py:obj:`airflow.sensors.base.BaseSensorOperator`
Waits for a timedelta after the run's data interval.
:param delta: time length to wait after the data interval before succeeding.
.. py:method:: poke(context)
Function that the sensors defined while deriving this class should
override.
.. py:class:: TimeDeltaSensorAsync(*, delta, **kwargs)
Bases: :py:obj:`TimeDeltaSensor`
A drop-in replacement for TimeDeltaSensor that defers itself to avoid
taking up a worker slot while it is waiting.
:param delta: time length to wait after the data interval before succeeding.
.. py:method:: execute(context)
This is the main method to derive when creating an operator.
Context is the same dictionary used as when rendering jinja templates.
Refer to get_template_context for more context.
.. py:method:: execute_complete(context, event=None)
Callback for when the trigger fires - returns immediately.