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:
@@ -5,6 +5,15 @@ paths:
|
||||
|
||||
# DTO и enum-ы (`src/schemas/`)
|
||||
|
||||
Обработка вложений (design change `async-attachments`, решения 1–3):
|
||||
`AttachmentFullDTO` — ещё `staging_key`, `error_code` и `variants` кортежем
|
||||
(не колонка: подставляет сервис); `AttachmentInListDTO.staging_key`;
|
||||
`AttachmentJobDTO`, `AttachmentVariantDTO`; enum `AttachmentJobState`,
|
||||
`AttachmentVariantName`, `AttachmentErrorCode`, `AttachmentJobReason`,
|
||||
`JobOutcome`. Сообщение брокера — pydantic-модель
|
||||
`src/schemas/jobs/attachment.py`, а не DTO: оно приходит извне и разбирается по
|
||||
`contracts/jobs.schema.json`.
|
||||
|
||||
`src/schemas/dataclasses/<domain>.py` — DTO между repo → service → api;
|
||||
`src/schemas/enums/<domain>.py` — `StrEnum` доменов. HTTP-модели
|
||||
(pydantic) лежат не здесь, а в `src/api/schemas/` (`api-layer.md`).
|
||||
|
||||
Reference in New Issue
Block a user