airflow.providers.redis.sensors.redis_pub_sub
¶
Module Contents¶
-
class
airflow.providers.redis.sensors.redis_pub_sub.
RedisPubSubSensor
(*, channels: Union[List[str], str], redis_conn_id: str, **kwargs)[source]¶ Bases:
airflow.sensors.base.BaseSensorOperator
Redis sensor for reading a message from pub sub channels
- Parameters
-
poke
(self, context: Dict)[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'}
- Parameters
context (dict) -- the context object
- Returns
True
if message (with type 'message') is available orFalse
if not