Fix async loading bugs and add test results
Critical Fixes:
- Fix async context manager usage in fastapi_app.py (async for -> async with)
- Add broadcast() method to WebSocketService
- Initialize BackgroundLoaderService properly in lifespan function
Testing:
- Execute manual testing (Tests 1, 5, 8, 9)
- Create comprehensive test results document
- Verify API endpoints return 202 Accepted
- Confirm database persistence works
- Validate startup incomplete series check
Test Results:
- Response time: 61ms (target: < 500ms) ✅
- 4 series found with missing data on startup
- Database fields properly persisted
- All critical bugs fixed
Files:
- check_db.py: Database inspection utility
- docs/MANUAL_TESTING_RESULTS.md: Comprehensive test results
- src/server/fastapi_app.py: Fixed async context manager, initialized BackgroundLoaderService
- src/server/services/websocket_service.py: Added broadcast() method
This commit is contained in:
@@ -443,6 +443,14 @@ class WebSocketService:
|
||||
"""Disconnect a WebSocket client."""
|
||||
await self._manager.disconnect(connection_id)
|
||||
|
||||
async def broadcast(self, message: Dict[str, Any]) -> None:
|
||||
"""Broadcast a message to all connected clients.
|
||||
|
||||
Args:
|
||||
message: Dictionary message to broadcast to all clients
|
||||
"""
|
||||
await self._manager.broadcast(message)
|
||||
|
||||
async def broadcast_download_progress(
|
||||
self, download_id: str, progress_data: Dict[str, Any]
|
||||
) -> None:
|
||||
|
||||
Reference in New Issue
Block a user