pingzh commented on code in PR #21877:
URL: https://github.com/apache/airflow/pull/21877#discussion_r844231217


##########
airflow/jobs/scheduler_job.py:
##########
@@ -783,6 +783,22 @@ def _execute(self) -> None:
                     self.log.exception("Exception when executing 
DagFileProcessorAgent.end")
             self.log.info("Exited execute loop")
 
+    def _update_dag_run_state_for_paused_dags(self):
+        try:
+            paused_dag_ids = DagModel.get_all_paused_dag_ids()
+            for dag_id in paused_dag_ids:

Review Comment:
   it is possible. we can put the dag_id to the cache (or visited) when there 
is no `dag_runs` with `running` state for that dag_id. In this case, we skip 
them. let me know your thoughts. thanks



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