airflow.sensors.time_delta

Module Contents

Classes

TimeDeltaSensor

Waits for a timedelta after the run's data interval.

TimeDeltaSensorAsync

A deferrable drop-in replacement for TimeDeltaSensor.

class airflow.sensors.time_delta.TimeDeltaSensor(*, delta, **kwargs)[source]

Bases: airflow.sensors.base.BaseSensorOperator

Waits for a timedelta after the run’s data interval.

Parameters

delta – time length to wait after the data interval before succeeding.

See also

For more information on how to use this sensor, take a look at the guide: TimeDeltaSensor

poke(context)[source]

Function defined by the sensors while deriving this class should override.

class airflow.sensors.time_delta.TimeDeltaSensorAsync(*, delta, **kwargs)[source]

Bases: TimeDeltaSensor

A deferrable drop-in replacement for TimeDeltaSensor.

Will defers itself to avoid taking up a worker slot while it is waiting.

Parameters

delta – time length to wait after the data interval before succeeding.

See also

For more information on how to use this sensor, take a look at the guide: TimeDeltaSensorAsync

execute(context)[source]

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.

execute_complete(context, event=None)[source]

Callback for when the trigger fires - returns immediately.

Was this entry helpful?