From 2ac6f898a785731b9507a29fd3805ce75c9a8bc3 Mon Sep 17 00:00:00 2001 From: "MH.Dmitrii" Date: Mon, 14 Sep 2026 18:40:00 +0300 Subject: [PATCH] update claude.md, imports sort --- CLAUDE.md | 132 ++++++++++++++++++++++++++----- src/messaging/rabbitmq_client.py | 1 + 2 files changed, 114 insertions(+), 19 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 15a2dbe..389b054 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -38,32 +38,123 @@ workers. Python >=3.13,<4.0, Poetry for dependency management. - `RabbitMQClient` — shared class, lazy `connect()` (can't be async `__init__`), holds one `connection` + one `channel`, `get_channel()` ensures setup. -- Topic exchange named `"email"`. Each message type gets its own routing key - (`email.welcome`, `email.reset`) and its own durable queue - (`queue_welcome_email`, `queue_reset_email`), each queue explicitly bound - to the exchange with its own key. -- **Important**: both producer and consumer must declare/bind the queues — - if only the consumer does it and the consumer has never run, `publish` - on a not-yet-existing queue silently loses the message. `EmailProducer.setup()` - also declares+binds both queues defensively. -- `message.process()` async context manager = manual ack (auto-ack on - success, requeue/nack on exception) — this is the right choice for email, - not `no_ack=True`. -- Email templates: Jinja2, inline CSS (email clients don't support `