Module Contents

class airflow.contrib.sensors.redis_pub_sub_sensor.RedisPubSubSensor(channels, redis_conn_id, *args, **kwargs)[source]

Bases: airflow.sensors.base_sensor_operator.BaseSensorOperator

Redis sensor for reading a message from pub sub channels

template_fields = ['channels'][source]
ui_color = #f0eee4[source]
poke(self, context)[source]

Check for message on subscribed channels and write to xcom the message with key message

An example of message {'type': 'message', 'pattern': None, 'channel': b'test', 'data': b'hello'}


context (dict) – the context object


True if message (with type ‘message’) is available or False if not

Was this entry helpful?