This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/master by this push:
new fff3444 Add health-check for celery worker (#14522)
fff3444 is described below
commit fff344443f764a0a5c9f5ba7dfbfa1e5e1115348
Author: Kamil Breguła <[email protected]>
AuthorDate: Sun Feb 28 10:29:38 2021 +0100
Add health-check for celery worker (#14522)
Co-authored-by: Kamil Breguła <[email protected]>
---
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 1604d0a..58f23cd 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 dd3bff2..f6c21e0 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