Extract startup resource initialization from main.py
Move lifespan startup logic into app.startup and remove local imports from app.main._lifespan. Mark startup wiring issue as done.
This commit is contained in:
@@ -29,7 +29,7 @@ Reference: `Docs/Refactoring.md` for full analysis of each issue.
|
||||
- Fix: document the single-process limitation clearly in code and project docs.
|
||||
- Expected outcome: authentication behavior is consistent across deployment modes, and session invalidation works correctly in multi-worker setups.
|
||||
|
||||
- `backend/app/main.py` uses local imports inside `_lifespan()` to avoid circular dependencies, indicating that startup logic is tightly coupled with services.
|
||||
- Status: **done** — `backend/app/main.py` uses local imports inside `_lifespan()` to avoid circular dependencies, indicating that startup logic is tightly coupled with services.
|
||||
- Fix: evaluate whether the startup initialization can be moved into a dedicated `startup.py` or split service initialization into smaller modules; keep import order simple and explicit.
|
||||
- Expected outcome: cleaner startup code with lower coupling, fewer hidden circular import risks, and easier maintenance.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user