feat: process attachments asynchronously with RabbitMQ and a worker

Upload answers 202 after staging, a queued job in PostgreSQL and a broker
confirm; a separate worker publishes the original and a thumbnail with
bounded retries. Adds the job and variant tables, the broker service, the
worker S3 user, cleanup and reconcile support for staging and variants,
the failure stand with broker and worker, bench and driver updates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-31 06:48:20 +03:00
co-authored by Claude Opus 5.5
parent 40c709a78b
commit ff1a83b6ff
107 changed files with 9765 additions and 993 deletions
+3 -2
View File
@@ -26,8 +26,9 @@ set -eu
# ROLLOUT_READY_TIMEOUT (60) — срок готовности новой реплики, с;
# ROLLOUT_DRAIN_TIMEOUT (90) — срок дренажа старой, с: больше timeout
# server пути загрузки и наибольшей длительности загрузки (LB 30 с,
# загрузка ≈ 73 с — haproxy.cfg, design change upload-memory, решение
# 7), иначе плановая замена оборвала бы живую загрузку. Обычно дренаж
# загрузка ≈ 76 с — haproxy.cfg, design change upload-memory, решение
# 7; async-attachments, решение 3), иначе плановая замена оборвала бы
# живую загрузку. Обычно дренаж
# кончается за 0–2 с, срок нужен только медленной загрузке.
# Проект compose — как у самого docker compose: COMPOSE_PROJECT_NAME,
# COMPOSE_FILE, COMPOSE_ENV_FILES или docker-compose.yml и .env