refactor: move services to a unit of work over repository ports
Services depend only on src/core/ports: async with self.uow is one transaction, commit is explicit, leaving without it rolls back. A connection is held per step, the JSON routers keep a shared request deadline, and rollback runs under the block deadline. Adds service-tests with fakes, a repo contract run on both the fake and SQL, and make service_test / service_test_db. API, schema and settings are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -217,7 +217,8 @@ pass». Модуль `attachment_cleanup_service`: «Finished staging cleanup pa
|
||||
или БД, `info`, если что-то убрано или проход остановлен сигналом,
|
||||
иначе `debug` — пустой проход раз в минуту журнал не засоряет.
|
||||
- Причину отказа пишет нижний слой: клиент S3 (`object_storage`) и
|
||||
`session_scope` (`database`, `warning` «Database is unavailable»);
|
||||
`session_scope` под единицей работы (`database`, `warning` «Database is
|
||||
unavailable»; та же запись у общего срока JSON-запроса — `deadline_scope`);
|
||||
сервис только называет `interrupted_by`.
|
||||
- Сверка bucket и БД (спек `service-logging`, «Журнал сверки»; design
|
||||
change `track2-reconciler`, решение 8), модуль
|
||||
|
||||
Reference in New Issue
Block a user