Files
mtusi2026lab5/src/infra/broker/instance.py
T
ricoromaandClaude Opus 5.5 ff1a83b6ff 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>
2026-10-31 06:48:20 +03:00

17 lines
735 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""Издатель заданий процесса 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,
)