blob: d86dcdf617bf754f5b033a3016e387de906b481a [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.
:type delta: datetime.timedelta
.. py:method:: poke(self, 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.
:type delta: datetime.timedelta
.. py:method:: execute(self, 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(self, context, event=None)
Callback for when the trigger fires - returns immediately.