From fff344443f764a0a5c9f5ba7dfbfa1e5e1115348 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20Bregu=C5=82a?= Date: Sun, 28 Feb 2021 10:29:38 +0100 Subject: [PATCH] Add health-check for celery worker (#14522) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Kamil Breguła --- docs/apache-airflow/start/docker-compose.yaml | 7 +++++++ docs/apache-airflow/start/docker.rst | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/apache-airflow/start/docker-compose.yaml b/docs/apache-airflow/start/docker-compose.yaml index 1604d0ad49126..58f23cd103cde 100644 --- a/docs/apache-airflow/start/docker-compose.yaml +++ b/docs/apache-airflow/start/docker-compose.yaml @@ -107,6 +107,13 @@ services: airflow-worker: <<: *airflow-common command: celery worker + healthcheck: + test: + - "CMD-SHELL" + - 'celery --app airflow.executors.celery_executor.app inspect ping -d "celery@$${HOSTNAME}"' + interval: 10s + timeout: 10s + retries: 5 restart: always airflow-init: diff --git a/docs/apache-airflow/start/docker.rst b/docs/apache-airflow/start/docker.rst index dd3bff225103f..f6c21e02bf164 100644 --- a/docs/apache-airflow/start/docker.rst +++ b/docs/apache-airflow/start/docker.rst @@ -104,7 +104,7 @@ In the second terminal you can check the condition of the containers and make su $ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES - 247ebe6cf87a apache/airflow:master-python3.8 "/usr/bin/dumb-init …" 3 minutes ago Up 3 minutes 8080/tcp compose_airflow-worker_1 + 247ebe6cf87a apache/airflow:master-python3.8 "/usr/bin/dumb-init …" 3 minutes ago Up 3 minutes (healthy) 8080/tcp compose_airflow-worker_1 ed9b09fc84b1 apache/airflow:master-python3.8 "/usr/bin/dumb-init …" 3 minutes ago Up 3 minutes 8080/tcp compose_airflow-scheduler_1 65ac1da2c219 apache/airflow:master-python3.8 "/usr/bin/dumb-init …" 3 minutes ago Up 3 minutes (healthy) 0.0.0.0:5555->5555/tcp, 8080/tcp compose_flower_1 7cb1fb603a98 apache/airflow:master-python3.8 "/usr/bin/dumb-init …" 3 minutes ago Up 3 minutes (healthy) 0.0.0.0:8080->8080/tcp compose_airflow-webserver_1