You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2019/12/16 11:13:46 UTC

[GitHub] [airflow] ashb commented on a change in pull request #6820: [AIRFLOW-6255] Redis Hook Refactor

ashb commented on a change in pull request #6820: [AIRFLOW-6255] Redis Hook Refactor
URL: https://github.com/apache/airflow/pull/6820#discussion_r358177159
 
 

 ##########
 File path: airflow/contrib/sensors/redis_pub_sub_sensor.py
 ##########
 @@ -40,7 +40,7 @@ def __init__(self, channels, redis_conn_id, *args, **kwargs):
         super().__init__(*args, **kwargs)
         self.channels = channels
         self.redis_conn_id = redis_conn_id
-        self.pubsub = RedisHook(redis_conn_id=self.redis_conn_id).get_conn().pubsub()
+        self.pubsub = RedisHook(redis_conn_id=self.redis_conn_id).create_pubsub()
 
 Review comment:
   Creating connections in Execute is a _hard_ no. This code will get called _every time Airflow parses your dag file_

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services