ЛР5: брокер RabbitMQ, worker, outbox, retry/DLQ/replay, трек 1

This commit is contained in:
2026-11-12 13:29:23 +03:00
parent 276dbdad8a
commit 726c77156e
66 changed files with 7731 additions and 18 deletions
+14
View File
@@ -0,0 +1,14 @@
#!/bin/sh
set -eu
cd "$(dirname "$0")/.."
: "${TARGET_INSTANCE_ID:?test provides target API instance alias}"
case "$TARGET_INSTANCE_ID" in
*[!0-9a-f]*) echo "unexpected instance id format" >&2; exit 2 ;;
esac
cid=$(docker ps -q --filter "id=$TARGET_INSTANCE_ID" \
--filter "label=com.docker.compose.project=mtusi-lab5" \
--filter "label=com.docker.compose.service=api")
[ -n "$cid" ] || { echo "no running api replica matches" >&2; exit 3; }
[ "$(printf '%s\n' "$cid" | wc -l)" -eq 1 ] || { echo "ambiguous id" >&2; exit 3; }
docker stop -t 15 "$cid" >/dev/null
echo "stopped api container $cid"