Task 7 complete: move config operational orchestration from routers into service/task layer

This commit is contained in:
2026-04-10 21:24:54 +02:00
parent 91e5792caf
commit 952469e667
5 changed files with 87 additions and 44 deletions

View File

@@ -56,6 +56,7 @@ Reference: `Docs/Refactoring.md` for full analysis of each issue.
- Issue: `app/routers/config.py` contains operational orchestration such as activation crash tracking, pending recovery state updates, and forced health probes, which belongs in service/task code not the HTTP layer.
- Propose: Refactor jail activation/deactivation/recovery coordination into services or task managers that manage state updates and health probe triggers on behalf of the router.
- Test: Confirm router tests only cover HTTP translation while unit tests for the new service/task components cover the orchestration logic.
- Status: completed
8. Decouple periodic background jobs from FastAPI application state
- Goal: Make scheduled task runners explicit and testable by removing direct `app.state` dependency from background task code.