eladkal commented on a change in pull request #5515:  [AIRFLOW-4879] add 
poll_interval and schema to PrestoHook
URL: https://github.com/apache/airflow/pull/5515#discussion_r311919670
 
 

 ##########
 File path: airflow/hooks/presto_hook.py
 ##########
 @@ -41,6 +61,11 @@ class PrestoHook(DbApiHook):
     conn_name_attr = 'presto_conn_id'
     default_conn_name = 'presto_default'
 
+    def __init__(self, *args, **kwargs):
+        super().__init__(*args, **kwargs)
+        self.poll_interval = kwargs.pop("poll_interval")
 
 Review comment:
   Yes. This can be set from the Connection, however if you want to overwrite 
the defaults in the constructor you must pull it from kwargs. This is how it's 
done in other db hooks:
   https://github.com/apache/airflow/blob/master/airflow/hooks/mysql_hook.py#L48
   https://github.com/apache/airflow/blob/master/airflow/hooks/mssql_hook.py#L36
   
   Would you be more comfortable with specifying the parameters like:
   
https://github.com/apache/airflow/blob/master/airflow/contrib/hooks/sqoop_hook.py#L57
 

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to