Automatically reschedule stalled queued tasks in CeleryExecutor (v2) (#23690)
authorChris Redekop <32752154+repl-chris@users.noreply.github.com>
Fri, 20 May 2022 14:40:58 +0000 (08:40 -0600)
committerGitHub <noreply@github.com>
Fri, 20 May 2022 14:40:58 +0000 (15:40 +0100)
commitbaae70c88ed45d4b45e64754cb3decb99472c601
tree0a2bd209b201768bc6217163abfb72a466ef684c
parent888bc2e233b1672a61433929e26b82210796fd71
Automatically reschedule stalled queued tasks in CeleryExecutor (v2) (#23690)

Celery can lose tasks on worker shutdown, causing airflow to just wait on them
indefinitely (may be related to celery/celery#7266). This PR expands the
"stalled tasks" functionality which is already in place for adopted tasks, and
adds the ability to apply it to all tasks such that these lost/hung tasks can
be automatically recovered and queued up again.
airflow/config_templates/config.yml
airflow/config_templates/default_airflow.cfg
airflow/executors/celery_executor.py
tests/executors/test_celery_executor.py