mhenc commented on code in PR #25935:
URL: https://github.com/apache/airflow/pull/25935#discussion_r957261974


##########
airflow/jobs/scheduler_job.py:
##########
@@ -1476,9 +1488,35 @@ def _find_zombies(self, session: Session) -> None:
         for ti, file_loc in zombies:
             request = TaskCallbackRequest(
                 full_filepath=file_loc,
+                dag_directory=ti.dag_model.dag_directory,
                 simple_task_instance=SimpleTaskInstance.from_ti(ti),
                 msg=f"Detected {ti} as zombie",
             )
             self.log.error("Detected zombie job: %s", request)
             self.executor.send_callback(request)
             Stats.incr('zombies_killed')
+
+    @provide_session
+    def _cleanup_stale_dags(self, session: Session) -> None:
+        """
+        Find all dags that were not updated by Dag Processor in last 10 
minutes and mark them as inactive.

Review Comment:
   Ok. However I was not sure whether we want to introduce new config option as 
there are already plenty of them. But I understand the some user may need to 
adjust it.
   
   The new config is [scheduler]stalled_dags_update_timeout - please let me 
know if you have any better name.



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