airflow.providers.redis.sensors.redis_pub_sub¶
Classes¶
| Redis sensor for reading a message from pub sub channels. | 
Module Contents¶
- class airflow.providers.redis.sensors.redis_pub_sub.RedisPubSubSensor(*, channels, redis_conn_id, **kwargs)[source]¶
- Bases: - airflow.providers.redis.version_compat.BaseSensorOperator- Redis sensor for reading a message from pub sub channels. - Parameters:
 - template_fields: collections.abc.Sequence[str] = ('channels',)[source]¶
 - poke(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'}- Parameters:
- context (airflow.sdk.definitions.context.Context) – the context object 
- Returns:
- Trueif message (with type ‘message’) is available or- Falseif not
- Return type: