Nataneljpwd commented on code in PR #52700:
URL: https://github.com/apache/airflow/pull/52700#discussion_r2253922572


##########
providers/sftp/src/airflow/providers/sftp/hooks/sftp.py:
##########
@@ -45,6 +49,32 @@
 
     from airflow.models.connection import Connection
 
+exclude_methods = [
+    "__init__",
+    "get_ui_field_behaviour",
+    "get_conn",
+    "close_conn",
+    "get_managed_conn",
+    "get_conn_count",
+]  # exclude the methods which are not using the connection, so that we won't 
create a
+# connection when not needed, i.e init
+
+
+def handle_connection_management_decorator(func):

Review Comment:
   done



##########
providers/sftp/src/airflow/providers/sftp/hooks/sftp.py:
##########
@@ -72,6 +102,9 @@ class SFTPHook(SSHHook):
     default_conn_name = "sftp_default"
     conn_type = "sftp"
     hook_name = "SFTP"
+    CONNECTION_NOT_OPEN_EXCEPTION: ConnectionNotOpenedException = 
ConnectionNotOpenedException(

Review Comment:
   done



##########
providers/sftp/src/airflow/providers/sftp/hooks/sftp.py:
##########
@@ -45,6 +49,32 @@
 
     from airflow.models.connection import Connection
 
+exclude_methods = [
+    "__init__",
+    "get_ui_field_behaviour",
+    "get_conn",
+    "close_conn",
+    "get_managed_conn",
+    "get_conn_count",
+]  # exclude the methods which are not using the connection, so that we won't 
create a
+# connection when not needed, i.e init
+
+
+def handle_connection_management_decorator(func):

Review Comment:
   done



##########
providers/sftp/src/airflow/providers/sftp/hooks/sftp.py:
##########
@@ -45,6 +49,32 @@
 
     from airflow.models.connection import Connection
 
+exclude_methods = [
+    "__init__",
+    "get_ui_field_behaviour",
+    "get_conn",
+    "close_conn",
+    "get_managed_conn",
+    "get_conn_count",
+]  # exclude the methods which are not using the connection, so that we won't 
create a
+# connection when not needed, i.e init

Review Comment:
   done



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to