airflow.sensors.time_sensor

Module Contents

Classes

TimeSensor

Waits until the specified time of the day.

TimeSensorAsync

Waits until the specified time of the day, freeing up a worker slot while

class airflow.sensors.time_sensor.TimeSensor(*, target_time, **kwargs)[source]

Bases: airflow.sensors.base.BaseSensorOperator

Waits until the specified time of the day.

Parameters

target_time – time after which the job succeeds

poke(context)[source]

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

class airflow.sensors.time_sensor.TimeSensorAsync(*, target_time, **kwargs)[source]

Bases: airflow.sensors.base.BaseSensorOperator

Waits until the specified time of the day, freeing up a worker slot while it is waiting.

Parameters

target_time – time after which the job succeeds

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?