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
+4
View File
@@ -91,6 +91,10 @@
`STAGING_RETENTION_SECONDS` — поля пока нет, появляется с очисткой staging.
- **Цепочка LB:** срок публикации 2 с: после тела 29 с < `timeout server` 30 с, наибольшая длительность загрузки 76 с
< дренаж 90 с. Прежние значения LB не меняются.
- **Apply:** `request_id` записей задания ставит сервис обработки сразу после разбора сообщения (а не `main.py`): разбор — его
шаг, задача доставки своя, контекст не течёт. `DROP` — третий исход `JobOutcome` рядом с `ACK` и `REQUEUE` дизайна: сообщение не
по схеме возвращать в очередь нельзя. Сообщение задания с `attachment_id` не своей строки считается неизвестным (`ACK`).
Подробности — design, «Уточнения apply».
### Вопросы