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 2021/11/23 13:21:29 UTC

[GitHub] [airflow] ephraimbuddy commented on a change in pull request #19769: Handle stuck queued tasks in Celery

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



##########
File path: airflow/executors/celery_executor.py
##########
@@ -337,6 +344,12 @@ def sync(self) -> None:
 
         if self.adopted_task_timeouts:
             self._check_for_stalled_adopted_tasks()
+        # Use EventScheduler to avoid checking this too often
+        self.event_scheduler = EventScheduler()
+        self.event_scheduler.call_regular_interval(
+            self.stuck_queued_task_check_interval,
+            self._clear_stuck_queued_tasks(),
+        )

Review comment:
       I will create the timer at `start` method. 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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org