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 2023/01/05 06:24:55 UTC

[GitHub] [airflow] uranusjr commented on a diff in pull request #28675: MongoHook optimization

uranusjr commented on code in PR #28675:
URL: https://github.com/apache/airflow/pull/28675#discussion_r1062144019


##########
airflow/providers/mongo/hooks/mongo.py:
##########
@@ -90,15 +85,25 @@ def get_conn(self) -> MongoClient:
             options.update({"ssl_cert_reqs": CERT_NONE})
 
         self.client = MongoClient(self.uri, **options)
-
         return self.client
 
-    def close_conn(self) -> None:
-        """Closes connection"""
-        client = self.client
-        if client is not None:
-            client.close()
-            self.client = None
+    def create_uri(self) -> str:

Review Comment:
   ```suggestion
       def _create_uri(self) -> str:
   ```
   
   This doesn’t need to be public, from what I can tell?



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org