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/09/04 18:18:10 UTC
[GitHub] [airflow] ashb commented on a change in pull request #10729: Detect orphaned task instances by SchedulerJob id and heartbeat
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:
users@infra.apache.org