Document task DB access and unify background task DB handling

This commit is contained in:
2026-04-17 17:18:49 +02:00
parent 16687b0520
commit 5e5d7c34b2
12 changed files with 139 additions and 90 deletions

View File

@@ -406,4 +406,6 @@ Reference: `Docs/Refactoring.md` for full analysis of each issue.
**Docs changes needed:** Add a "Background Tasks and Database Access" section to `Docs/Architekture.md` explaining why tasks own their connections and how to write a new task.
**Status:** Completed ✅
**Why this is needed:** Without explanation, the inconsistency between router DI-provided connections and task-managed connections looks like an oversight. Documentation prevents future developers from incorrectly trying to inject a DB connection into a task via `Depends`, which would fail silently at runtime.