Хранить отзывы сессий в PostgreSQL, сохранять U+0000, ограничить ожидание БД
Application / stack (pull_request) Canceled after 0s
Skeleton contracts / contracts (pull_request) Canceled after 0s

This commit is contained in:
Pavel Grigorev
2026-11-06 17:11:03 +03:00
parent 0c6b95cc53
commit f69ad8c27c
31 changed files with 974 additions and 725 deletions
+20 -27
View File
@@ -1,39 +1,32 @@
# persistence: python tests/resilience.py --mode persistence --action-script scripts/restart.cmd --base-url http://127.0.0.1:8080
# date: 2026-10-29T09:19:40Z; base commit: 65003b6 (working tree, solution uncommitted); host: Windows 10, Docker Desktop 27.2.0, 12 CPU / 1.9 GiB for Docker VM
# date: 2026-11-06T09:35:18Z; fresh volumes; host: Windows 10, Docker Desktop 27.2.0, 12 CPU / 1.9 GiB for Docker VM
$ docker compose ps -a (before)
SERVICE STATUS
api Up 26 minutes (healthy)
api-restore Exited (0) 37 seconds ago
migrate Exited (0) 27 minutes ago
postgres Up 26 minutes (healthy)
postgres-restore Up About a minute (healthy)
valkey Up 26 minutes (healthy)
SERVICE STATUS
api Up 18 seconds (healthy)
migrate Exited (0) 19 seconds ago
postgres Up 26 seconds (healthy)
valkey Up 26 seconds (healthy)
Executing explicit persistence hook; hook output suppressed to avoid leaking secrets.
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.
$ docker compose ps -a (after)
SERVICE STATUS
api Up 1 second (health: starting)
api-restore Exited (0) 48 seconds ago
migrate Exited (0) 2 seconds ago
postgres Up 9 seconds (healthy)
postgres-restore Up About a minute (healthy)
valkey Up 9 seconds (healthy)
SERVICE STATUS
api Up 1 second (health: starting)
migrate Exited (0) 1 second ago
postgres Up 8 seconds (healthy)
valkey Up 8 seconds (healthy)
$ docker compose logs --since 2026-10-29T09:19:40Z postgres valkey api | grep shutdown/ready lines
valkey-1 | 7:M 29 Oct 2026 09:19:42.428 * User requested shutdown...
valkey-1 | 7:M 29 Oct 2026 09:19:42.927 * Server initialized
valkey-1 | 7:M 29 Oct 2026 09:19:42.927 * Ready to accept connections tcp
api-1 | 2026-10-29 09:19:41,679 INFO messenger: application stopping
api-1 | 2026-10-29 09:19:51,290 INFO uvicorn.error: Waiting for application startup.
api-1 | 2026-10-29 09:19:51,293 INFO messenger: application started
postgres-1 | 2026-10-29 09:19:42.542 UTC [27] LOG: checkpoint complete: wrote 7023 buffers (42.9%); 0 WAL file(s) added, 0 removed, 5 recycled; write=0.118 s,
postgres-1 | 2026-10-29 09:19:42.592 UTC [1] LOG: database system is shut down
postgres-1 | 2026-10-29 09:19:43.092 UTC [29] LOG: database system was shut down at 2026-10-29 09:19:42 UTC
postgres-1 | 2026-10-29 09:19:43.101 UTC [1] LOG: database system is ready to accept connections
$ docker compose logs --since 2026-11-06T09:35:18Z postgres valkey api | shutdown/ready lines
valkey-1 | 7:M 06 Nov 2026 09:35:19.811 * User requested shutdown...
valkey-1 | 7:M 06 Nov 2026 09:35:20.228 * Ready to accept connections tcp
api-1 | 2026-11-06 09:35:19,146 INFO messenger: application stopping
api-1 | 2026-11-06 09:35:28,169 INFO uvicorn.error: Waiting for application startup.
api-1 | 2026-11-06 09:35:28,171 INFO messenger: application started
postgres-1 | 2026-11-06 09:35:19.812 UTC [1] LOG: database system is shut down
postgres-1 | 2026-11-06 09:35:20.286 UTC [29] LOG: database system was shut down at 2026-11-06 09:35:19 UTC
postgres-1 | 2026-11-06 09:35:20.291 UTC [1] LOG: database system is ready to accept connections
$ docker volume ls (volumes kept)
grigoriev-lab2_pgdata
grigoriev-lab2_pgdata_restore