|
|
94de91ffa0
|
feat: implement WebSocket real-time progress updates
- Add ProgressService for centralized progress tracking and broadcasting
- Integrate ProgressService with DownloadService for download progress
- Integrate ProgressService with AnimeService for scan progress
- Add progress-related WebSocket message models (ScanProgress, ErrorNotification, etc.)
- Initialize ProgressService with WebSocket callback in application startup
- Add comprehensive unit tests for ProgressService
- Update infrastructure.md with ProgressService documentation
- Remove completed WebSocket Real-time Updates task from instructions.md
The ProgressService provides:
- Real-time progress tracking for downloads, scans, and queue operations
- Automatic progress percentage calculation
- Progress lifecycle management (start, update, complete, fail, cancel)
- WebSocket integration for instant client updates
- Progress history with size limits
- Thread-safe operations using asyncio locks
- Support for metadata and custom messages
Benefits:
- Decoupled progress tracking from WebSocket broadcasting
- Single reusable service across all components
- Supports multiple concurrent operations efficiently
- Centralized progress tracking simplifies monitoring
- Instant feedback to users on long-running operations
|
2025-10-17 11:12:06 +02:00 |
|
|
|
028d91283e
|
feat: implement download queue service with persistence, priority, and retry logic
- Added comprehensive download queue service (download_service.py)
- Priority-based queue management (HIGH, NORMAL, LOW)
- Concurrent download processing with configurable limits
- Automatic queue persistence to JSON file
- Retry logic for failed downloads with max retry limits
- Real-time progress tracking and WebSocket broadcasting
- Queue operations: add, remove, reorder, pause, resume
- Statistics tracking: download speeds, sizes, ETA calculations
- Created comprehensive unit tests (test_download_service.py)
- 23 tests covering all service functionality
- Tests for queue management, persistence, retry logic
- Broadcast callbacks, error handling, and lifecycle
- Added structlog dependency for structured logging
- Updated infrastructure.md with download service documentation
- Removed completed task from instructions.md
All tests passing (23/23)
|
2025-10-17 10:07:16 +02:00 |
|