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 2022/02/04 05:44:47 UTC

[GitHub] [airflow] chenglongyan commented on a change in pull request #21283: Cleanup session.commit() when @provide_session decorator is used

chenglongyan commented on a change in pull request #21283:
URL: https://github.com/apache/airflow/pull/21283#discussion_r799181482



##########
File path: airflow/cli/commands/connection_command.py
##########
@@ -253,7 +254,6 @@ def _import_helper(file_path):
             if session.query(Connection).filter(Connection.conn_id == conn_id).first():
                 print(f'Could not import connection {conn_id}: connection already exists.')
                 continue
-
             session.add(conn)
-            session.commit()
-            print(f'Imported connection {conn_id}')
+            print(f'Load connection {conn_id}')
+    print("Successfully imported all connections.")

Review comment:
       -_-| , i will be more careful...




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