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>
17 lines
735 B
Python
17 lines
735 B
Python
"""Издатель заданий процесса API.
|
||
|
||
Создаётся при импорте по `settings.broker`, соединение открывает первая
|
||
публикация: без брокера процесс стартует. Импортируют модуль только
|
||
`src/main.py` (закрытие в lifespan) и `src/api/dependencies.py`. Очередь — по
|
||
имени базы из `settings.database`: `make test_isolated` с базой `test_<db>` не
|
||
смешивается с рабочей.
|
||
"""
|
||
|
||
from src.config import settings
|
||
from src.infra.broker.client import create_job_publisher
|
||
|
||
job_publisher = create_job_publisher(
|
||
settings.broker,
|
||
namespace=settings.database.name,
|
||
)
|