Commit Graph

6 Commits

Author SHA1 Message Date
pacnpal
512dd1ff88 Eliminating duplicate queue processing that was causing race conditions
Adding proper processing state tracking and timing
Implementing more aggressive monitoring (1-minute intervals)
Adding activity tracking to detect and recover from hung states
Improving error handling and logging throughout the system
Reducing timeouts and deadlock thresholds for faster recovery
2024-11-15 22:38:36 +00:00
pacnpal
2e2951e714 Fixed the "cannot import name '_download_progress'" error by:
Adding a shared progress_tracker instance in processor/init.py
Exposing public functions that wrap the ProgressTracker methods
Removing direct access to private _download_progress variable
Fixed the "'QueueItem' object has no attribute 'retry_count'" error by:

Updating the QueueItem class in queue/models.py to use retry_count instead of retries
This matches the field name used in the queue manager's implementation
2024-11-15 19:19:46 +00:00
pacnpal
12810273a6 Adding the missing priority field with a default value of 0 2024-11-15 19:05:28 +00:00
pacnpal
780be9e391 Adding the missing guild_id field to the QueueItem class
Changing user_id to author_id for consistency with the message handler
Updating the field types from str to int for all Discord IDs (message_id, channel_id, author_id, guild_id)
2024-11-15 19:02:51 +00:00
pacnpal
61fbe7ca49 Adding the processing_time field to the QueueItem class in models.py with a default value of 0.0
Ensuring proper type conversion for the processing_time field in the persistence layer
Maintaining all existing functionality while adding the new field
2024-11-15 18:45:25 +00:00
pacnpal
b1eafbb01d Refactor queue system into modular structure
- Created new queue module with separate components:
  - models.py: QueueItem and QueueMetrics data classes
  - persistence.py: Queue state persistence
  - monitoring.py: Health monitoring and metrics
  - cleanup.py: Cleanup operations
  - manager.py: Main queue management
  - __init__.py: Package exports

- Updated imports in video_archiver.py and processor.py
- Removed old enhanced_queue.py
- Updated README with new queue system details

This refactoring improves code organization and maintainability
through better separation of concerns while maintaining all
existing functionality.
2024-11-15 18:16:53 +00:00