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 2021/06/01 11:42:27 UTC

[GitHub] [airflow] uranusjr commented on a change in pull request #12822: Removing redundant calls to session.commit()

uranusjr commented on a change in pull request #12822:
URL: https://github.com/apache/airflow/pull/12822#discussion_r643024863



##########
File path: airflow/jobs/base_job.py
##########
@@ -246,7 +246,6 @@ def run(self):
             finally:
                 self.end_date = timezone.utcnow()
                 session.merge(self)
-                session.commit()

Review comment:
       Is it? The context manager only commits when exited successfully (rollbacks on an exception). This commit also saves changes on an exception.




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