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



##########
File path: airflow/jobs/scheduler_job.py
##########
@@ -1759,3 +1759,46 @@ def _emit_pool_metrics(self, session: Session = None) -> 
None:
     @provide_session
     def heartbeat_callback(self, session: Session = None) -> None:
         Stats.incr('scheduler_heartbeat', 1, 1)
+
+    @provide_session
+    def reset_state_for_orphaned_tasks(self, session: Session = None):
+        """
+        Reset any TaskInstance still in QUEUED state that were enqueued by a
+        SchedulerJob that is no longer running.
+        """
+        timeout = conf.getint('scheduler', 'scheduler_health_check_threshold')

Review comment:
       I thought this already existed - I'll have to check




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