airflow.contrib.operators.redis_publish_operator

Module Contents

class airflow.contrib.operators.redis_publish_operator.RedisPublishOperator(channel, message, redis_conn_id='redis_default', *args, **kwargs)[source]

Bases: airflow.models.BaseOperator

Publish a message to Redis.

Parameters
  • channel (str) – redis channel to which the message is published (templated)

  • message (str) – the message to publish (templated)

  • redis_conn_id (str) – redis connection to use

template_fields = ['channel', 'message'][source]
execute(self, context)[source]

Publish the message to Redis channel

Parameters

context (dict) – the context object