From ddfac1f715bbdb108411382abd105d1c149a4613 Mon Sep 17 00:00:00 2001 From: Toksi Date: Wed, 22 Apr 2026 12:52:14 +0500 Subject: [PATCH 1/2] =?UTF-8?q?=D0=92=D0=BE=D0=B7=D0=B2=D1=80=D0=B0=D1=89?= =?UTF-8?q?=D1=91=D0=BD=20=D0=BF=D1=80=D0=B5=D0=B6=D0=BD=D0=B8=D0=B9=20Red?= =?UTF-8?q?is=20image=20=D0=B4=D0=BB=D1=8F=20=D1=81=D0=BE=D0=B2=D0=BC?= =?UTF-8?q?=D0=B5=D1=81=D1=82=D0=B8=D0=BC=D0=BE=D1=81=D1=82=D0=B8=20volume?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docker-compose.dev-ci.yml | 2 +- docker-compose.prod-ci.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.dev-ci.yml b/docker-compose.dev-ci.yml index 782e64ac..0271744a 100644 --- a/docker-compose.dev-ci.yml +++ b/docker-compose.dev-ci.yml @@ -17,7 +17,7 @@ services: - "127.0.0.1:8000:8000" redis: - image: redis:7.2.5 + image: redis:latest restart: unless-stopped expose: - 6379 diff --git a/docker-compose.prod-ci.yml b/docker-compose.prod-ci.yml index 45df8d3f..6b80ba70 100644 --- a/docker-compose.prod-ci.yml +++ b/docker-compose.prod-ci.yml @@ -13,7 +13,7 @@ services: ports: - "127.0.0.1:8000:8000" redis: - image: redis:7.2.5 + image: redis:latest restart: unless-stopped expose: - 6379 From 4046758512f30ffe91ddc2e2affe65c1c12acbb8 Mon Sep 17 00:00:00 2001 From: Toksi Date: Wed, 22 Apr 2026 12:54:03 +0500 Subject: [PATCH 2/2] =?UTF-8?q?=D0=92=D0=BE=D0=B7=D0=B2=D1=80=D0=B0=D1=89?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20blocking-=D0=BF=D1=80=D0=BE=D0=B2=D0=B5?= =?UTF-8?q?=D1=80=D0=BA=D0=B0=20Celery=20=D0=BF=D0=BE=D1=81=D0=BB=D0=B5=20?= =?UTF-8?q?=D0=B4=D0=B5=D0=BF=D0=BB=D0=BE=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/dev-ci.yml | 24 ++++++++++++++++++++++-- .github/workflows/release-ci.yml | 22 +++++++++++++++++++++- 2 files changed, 43 insertions(+), 3 deletions(-) diff --git a/.github/workflows/dev-ci.yml b/.github/workflows/dev-ci.yml index 8e841303..f159a7f8 100644 --- a/.github/workflows/dev-ci.yml +++ b/.github/workflows/dev-ci.yml @@ -83,8 +83,28 @@ jobs: exit 1 fi && - celery_status="$(docker inspect -f '{{.State.Status}}' api_celery 2>/dev/null || true)" && + celery_status="" && + celery_ping="" && + for attempt in $(seq 1 24); do + celery_status="$(docker inspect -f '{{.State.Status}}' api_celery 2>/dev/null || true)" && + if [ "$celery_status" = "running" ]; then + celery_ping="$(docker compose -f docker-compose.dev-ci.yml exec -T celerys sh -lc 'celery -A procollab inspect ping -d \"celery@$(hostname)\"' 2>&1 || true)" && + printf '%s\n' "$celery_ping" && + if printf '%s\n' "$celery_ping" | grep -q 'pong'; then + echo "Celery check passed on attempt ${attempt}" && + break + fi + fi && + + sleep 5 + done && + if [ "$celery_status" != "running" ]; then echo "Celery container is not running: ${celery_status}" >&2 && exit 1 - fi + fi && + + printf '%s\n' "$celery_ping" | grep -q 'pong' || { + echo "Celery ping failed" >&2 + exit 1 + } diff --git a/.github/workflows/release-ci.yml b/.github/workflows/release-ci.yml index 706e1769..5389e3d4 100644 --- a/.github/workflows/release-ci.yml +++ b/.github/workflows/release-ci.yml @@ -210,8 +210,28 @@ jobs: exit 1 fi - celery_status="$(docker inspect -f '{{.State.Status}}' api_celery 2>/dev/null || true)" + celery_status="" + celery_ping="" + for attempt in $(seq 1 24); do + celery_status="$(docker inspect -f '{{.State.Status}}' api_celery 2>/dev/null || true)" + if [ "$celery_status" = "running" ]; then + celery_ping="$(docker compose -f docker-compose.prod-ci.yml -p prod exec -T celerys sh -lc 'celery -A procollab inspect ping -d \"celery@$(hostname)\"' 2>&1 || true)" + printf '%s\n' "$celery_ping" + if printf '%s\n' "$celery_ping" | grep -q 'pong'; then + echo "Celery check passed on attempt ${attempt}" + break + fi + fi + + sleep 5 + done + if [ "$celery_status" != "running" ]; then echo "Celery container is not running: ${celery_status}" >&2 exit 1 fi + + printf '%s\n' "$celery_ping" | grep -q 'pong' || { + echo "Celery ping failed" >&2 + exit 1 + }