ephraimbuddy commented on a change in pull request #21413:
URL: https://github.com/apache/airflow/pull/21413#discussion_r806020930



##########
File path: airflow/jobs/scheduler_job.py
##########
@@ -1083,6 +1083,7 @@ def _schedule_dag_run(
         # TODO[HA]: Rename update_state -> schedule_dag_run, ?? something else?
         schedulable_tis, callback_to_run = 
dag_run.update_state(session=session, execute_callbacks=False)
         if dag_run.state in State.finished:
+            session.flush()  # to update the dag_run state

Review comment:
       Moved this to `dag_run.update_state` method




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to