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 2020/12/04 18:08:33 UTC

[GitHub] [airflow] ashb commented on a change in pull request #12815: Cleanup & improvements around scheduling

ashb commented on a change in pull request #12815:
URL: https://github.com/apache/airflow/pull/12815#discussion_r536283503



##########
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:
       This should actually just be
   ```suggestion
           session.flush()
   ```
   
   to be in line with https://github.com/apache/airflow/blob/master/CONTRIBUTING.rst#database-session-handling




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