lab5: асинхронная очередь, worker и идемпотентный pipeline

API принимает 202 после durable staging и TX intent (job+outbox); отдельные relay и worker публикуют/обрабатывают задания с publisher confirm, lease, retry/backoff, DLQ и replay. Добавлены версии pipeline, варианты thumbnail/crop/optimized, presign в verified staging, status-aware sweeper и admission control.
This commit is contained in:
Vladislav Kunetskiy
2026-10-30 22:36:52 +03:00
parent 6c5ba026f1
commit 4bdcac3dfa
95 changed files with 8466 additions and 764 deletions
+10 -10
View File
@@ -1,6 +1,6 @@
#!/bin/sh
set -eu
# Restart hook: bounce API replicas and every state store of the lab4 stand.
# Restart hook: bounce API replicas, worker/relay and every state store of the lab5 stand.
#
# scripts/restart.sh
#
@@ -29,16 +29,16 @@ compose() {
$COMPOSE_BIN --env-file .env -f compose.yaml "$@"
}
# 1. State stores: restart the running ones, then make sure they are healthy.
# Volumes are attached as before, nothing is dropped or re-seeded.
compose up -d --wait postgres redis seaweedfs
compose restart postgres redis seaweedfs
compose up -d --wait postgres redis seaweedfs
# 1. State stores and broker: restart the running ones, then make sure they are
# healthy. Volumes are attached as before, nothing is dropped or re-seeded.
compose up -d --wait postgres redis seaweedfs broker
compose restart postgres redis seaweedfs broker
compose up -d --wait postgres redis seaweedfs broker
# 2. API replicas: restart in place (same containers, same addresses) and bring
# back any replica that was stopped by the fault-injection hook.
compose restart api
compose up -d --wait --no-deps api
# 2. API replicas, worker and relay: restart in place and bring back any replica
# stopped by a fault-injection hook. The worker reconnects to the broker.
compose restart api worker relay
compose up -d --wait --no-deps api worker relay
# 3. Load balancer keeps its upstream; re-resolve in case addresses changed.
compose restart lb