Refactor blocklist schedule management into service

This commit is contained in:
2026-04-14 15:25:36 +02:00
parent 58bb769a35
commit b70dc6fa7a
6 changed files with 161 additions and 75 deletions

View File

@@ -208,7 +208,11 @@ Lazy imports mask circular dependencies at import time but surface as confusing
---
### TASK-07 — Move schedule management out of `routers/blocklist.py` into a service 🟠
### TASK-07 — Move schedule management out of `routers/blocklist.py` into a service
**Status:** Completed ✅
**Summary:** Router schedule endpoints now delegate schedule persistence and APScheduler job management to `blocklist_service`, removing the router's direct dependency on `app.tasks.blocklist_import`.
**Where:**
`backend/app/routers/blocklist.py` — line 51:
@@ -418,4 +422,4 @@ Additionally note in section 6 (Authentication): the `_session_cache` in `depend
- Cross-reference TASK-05 once it is complete (the task should delegate to a service).
**Why:**
The architecture document is a contract between contributors. Undocumented modules lead to inconsistent patterns and duplicate implementations when new developers add features that the undocumented module already handles.
The architecture document is a contract between contributors. Undocumented modules lead to inconsistent patterns and duplicate implementations when new developers add features that the undocumented module already handlzttttttttt nbbbbbbbbbbes.