forked from mtusi2026/mtusi2026lab5
RabbitMQ + transactional outbox, отдельный worker (thumbnail/crop/WebP), lease и heartbeat, retry с backoff+jitter, DLQ и replay, admission control; тесты отказов, трек 1 и отчёт.
37 lines
1.7 KiB
Plaintext
37 lines
1.7 KiB
Plaintext
# persistence — 2026-11-06T09:01:14Z
|
|
$ cat scripts/restart.sh
|
|
#!/bin/sh
|
|
# Restart API, LB, worker and every store (postgres, valkey, minio, rabbitmq) keeping all volumes.
|
|
set -eu
|
|
cd "$(dirname "$0")/.."
|
|
docker compose restart -t 10 postgres valkey minio rabbitmq
|
|
docker compose restart -t 25 worker api-1 api-2 nginx
|
|
## containers StartedAt before
|
|
mtusi-lab5-api-1-1 2026-11-06T08:57:35.409218424Z
|
|
mtusi-lab5-api-2-1 2026-11-06T08:58:05.819373965Z
|
|
mtusi-lab5-minio-1 2026-11-06T08:23:49.358710597Z
|
|
mtusi-lab5-nginx-1 2026-11-06T08:23:50.667392333Z
|
|
mtusi-lab5-postgres-1 2026-11-06T08:23:49.384126305Z
|
|
mtusi-lab5-rabbitmq-1 2026-11-06T09:00:59.611106504Z
|
|
mtusi-lab5-valkey-1 2026-11-06T08:23:49.401115472Z
|
|
mtusi-lab5-worker-1 2026-11-06T08:57:50.89592275Z
|
|
mtusi-lab5-worker-2 2026-11-06T08:58:32.593535839Z
|
|
$ make test-persistence ACTION_SCRIPT=scripts/restart.sh
|
|
python3 tests/resilience.py --mode persistence --action-script "scripts/restart.sh" --base-url "http://localhost:8080"
|
|
Executing explicit persistence hook; hook output suppressed to avoid leaking secrets.
|
|
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
|
|
## containers StartedAt after
|
|
mtusi-lab5-api-1-1 2026-11-06T09:01:17.294250804Z
|
|
mtusi-lab5-api-2-1 2026-11-06T09:01:17.309623971Z
|
|
mtusi-lab5-minio-1 2026-11-06T09:01:15.638306762Z
|
|
mtusi-lab5-nginx-1 2026-11-06T09:01:16.932816596Z
|
|
mtusi-lab5-postgres-1 2026-11-06T09:01:15.667794262Z
|
|
mtusi-lab5-rabbitmq-1 2026-11-06T09:01:16.680692637Z
|
|
mtusi-lab5-valkey-1 2026-11-06T09:01:15.692763803Z
|
|
mtusi-lab5-worker-1 2026-11-06T09:01:20.784383042Z
|
|
mtusi-lab5-worker-2 2026-11-06T09:01:20.824222792Z
|
|
## volumes
|
|
mtusi-lab5_miniodata
|
|
mtusi-lab5_pgdata
|
|
mtusi-lab5_rabbitmqdata
|