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/24 17:42:55 UTC

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

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



##########
File path: airflow/executors/celery_executor.py
##########
@@ -377,6 +387,39 @@ def _check_for_stalled_adopted_tasks(self):
             for key in timedout_keys:
                 self.change_state(key, State.FAILED)
 
+    @provide_session
+    def _clear_stuck_queued_tasks(self, session=None):
+        """
+        For some reasons, tasks can get stuck in queued state in DB while still not in
+        self.queued_tasks and not in self.running_tasks.

Review comment:
       Could you give here a little explanation, why tasks can get stuck. From the "For some reasons..." it sounds like there is some bug and this here is just a bandage.




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