File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8383 exit 1
8484 fi &&
8585
86- celery_status="" &&
87- celery_ping="" &&
88- for attempt in $(seq 1 24); do
89- celery_status="$(docker inspect -f '{{.State.Status}}' api_celery 2>/dev/null || true)" &&
90- if [ "$celery_status" = "running" ]; then
91- 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)" &&
92- printf '%s\n' "$celery_ping" &&
93- if printf '%s\n' "$celery_ping" | grep -q 'pong'; then
94- echo "Celery check passed on attempt ${attempt}" &&
95- break
96- fi
97- fi &&
98-
99- sleep 5
100- done &&
101-
86+ celery_status="$(docker inspect -f '{{.State.Status}}' api_celery 2>/dev/null || true)" &&
10287 if [ "$celery_status" != "running" ]; then
10388 echo "Celery container is not running: ${celery_status}" >&2 &&
10489 exit 1
105- fi &&
106-
107- printf '%s\n' "$celery_ping" | grep -q 'pong' || {
108- echo "Celery ping failed" >&2
109- exit 1
110- }
90+ fi
Original file line number Diff line number Diff line change @@ -210,28 +210,8 @@ jobs:
210210 exit 1
211211 fi
212212
213- celery_status=""
214- celery_ping=""
215- for attempt in $(seq 1 24); do
216- celery_status="$(docker inspect -f '{{.State.Status}}' api_celery 2>/dev/null || true)"
217- if [ "$celery_status" = "running" ]; then
218- 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)"
219- printf '%s\n' "$celery_ping"
220- if printf '%s\n' "$celery_ping" | grep -q 'pong'; then
221- echo "Celery check passed on attempt ${attempt}"
222- break
223- fi
224- fi
225-
226- sleep 5
227- done
228-
213+ celery_status="$(docker inspect -f '{{.State.Status}}' api_celery 2>/dev/null || true)"
229214 if [ "$celery_status" != "running" ]; then
230215 echo "Celery container is not running: ${celery_status}" >&2
231216 exit 1
232217 fi
233-
234- printf '%s\n' "$celery_ping" | grep -q 'pong' || {
235- echo "Celery ping failed" >&2
236- exit 1
237- }
You can’t perform that action at this time.
0 commit comments