lab5: async attachment pipeline (RabbitMQ + worker), thumbnail/crop/optimized, outbox relay, lease, idempotent replay (grade 4)

This commit is contained in:
2026-11-03 20:50:30 +03:00
parent 276dbdad8a
commit 15c3697bdc
45 changed files with 4964 additions and 19 deletions
+29
View File
@@ -0,0 +1,29 @@
#!/bin/sh
set -eu
cd "$(dirname "$0")/.."
docker compose --env-file .env restart postgres cache s3 broker
i=0
while [ $i -lt 120 ]; do
if docker compose --env-file .env exec -T broker rabbitmq-diagnostics -q ping > /dev/null 2>&1; then
break
fi
sleep 1
i=$((i + 1))
done
docker compose --env-file .env restart api worker
i=0
while [ $i -lt 90 ]; do
if curl -sf http://localhost:8080/health/ready > /dev/null 2>&1; then
exit 0
fi
sleep 1
i=$((i + 1))
done
echo "stack did not become healthy in 90 seconds" >&2
exit 1