forked from mtusi2026/mtusi2026lab3
chore: перенос решения lab2 (src, миграции, student-tests, Dockerfile, compose, lock) без изменений
Исходная точка lab3: код из solution/bvt2302-bodanyuk лабы 2, коммит ef44e48 (PR mtusi2026/mtusi2026lab2#42 принят). README, COURSE, contracts/ и tests/ преподавателя не тронуты; к Makefile дописан студенческий раздел lab2, .env.example — версия lab2. Исследование трека 2 lab2 (bench/track2) не переносилось. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
0ab3a341aa
commit
4f6cfda37a
Executable
+15
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
# Restart hook for `make test-persistence ACTION_SCRIPT=scripts/restart.sh`.
|
||||
# Restarts the API and ALL state stores (PostgreSQL, Valkey) of compose.yaml.
|
||||
# Volumes, schema and data are preserved: no `down -v`, no FLUSH, no re-seed.
|
||||
# Output is suppressed by the test; run it by hand to see the steps.
|
||||
set -eu
|
||||
cd "$(dirname "$0")/.."
|
||||
|
||||
# 1. API first: no request is served while the stores restart underneath it.
|
||||
docker compose stop api
|
||||
# 2. Stores: clean shutdown (PostgreSQL checkpoint, Valkey AOF fsync), then start again.
|
||||
docker compose restart postgres valkey
|
||||
# 3. API again; it waits for healthy stores via depends_on and reconnects its pool.
|
||||
docker compose start api
|
||||
echo "restart.sh: api, postgres and valkey restarted with volumes preserved"
|
||||
Reference in New Issue
Block a user