XD-DENG commented on a change in pull request #12815:
URL: https://github.com/apache/airflow/pull/12815#discussion_r536287662



##########
File path: airflow/models/dag.py
##########
@@ -1966,7 +1966,7 @@ def deactivate_stale_dags(expiration_date, session=None):
             )
             dag.is_active = False
             session.merge(dag)
-            session.commit()
+        session.commit()

Review comment:
       In this case, only in `model/dag.py` there are also a few other usage of 
`session.commit()` when `@provide_session` is used. Address them in this PR as 
well?




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


Reply via email to