Refactor history sync into history_service and update docs/tests

This commit is contained in:
2026-04-14 15:09:58 +02:00
parent 86fa271c40
commit 58bb769a35
7 changed files with 147 additions and 90 deletions

View File

@@ -145,7 +145,7 @@ Framework types in the service layer violate the Dependency Inversion principle,
---
### TASK-05 — Extract business logic out of `tasks/history_sync.py` into a service 🟠
### TASK-05 — Extract business logic out of `tasks/history_sync.py` into a service
**Where:**
`backend/app/tasks/history_sync.py` — lines 1516 import repositories directly; the entire `_run_sync_with_settings()` function contains paging logic, backfill window calculation, and `archive_ban_event` calls that constitute business logic.
@@ -371,7 +371,7 @@ Module-level asyncio primitives are a known footgun in Python async codebases. F
---
### TASK-12 — Remove duplicate import in `server_service.py` 🟡
### TASK-12 — Remove duplicate import in `server_service.py`
**Where:**
`backend/app/services/server_service.py` — lines 1718: