Commit Graph

6 Commits

Author SHA1 Message Date
pacnpal
8204df3599 Added process_video method to VideoProcessor class
Method delegates to queue_handler.process_video
Maintains proper separation of concerns between components
Preserves the existing video processing logic
2024-11-15 22:42:36 +00:00
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
73364e7438 ok 2024-11-15 22:27:29 +00:00
pacnpal
5fedd97b61 yeah 2024-11-15 22:02:19 +00:00
pacnpal
dae8bbb6b4 Adding the 'db' parameter to the VideoProcessor class initialization
Properly storing and handling the db instance
Ensuring the db is passed to the queue_handler when available
The QueueHandler class was already properly set up to handle the db parameter, so no changes were needed there. The database integration should now work correctly for:

Checking if videos are already archived
Adding newly archived videos to the database
Providing archived video information to users
2024-11-15 19:22:52 +00:00
pacnpal
971d52bd00 Separation of Concerns:
Core processing logic in VideoProcessor class
Dedicated message handling in MessageHandler
Queue operations in QueueHandler
Progress tracking in ProgressTracker
Reaction management in reactions.py
Improved Maintainability:
Each component has a single responsibility
Easier to test individual components
Better code organization and readability
Reduced file sizes for better version control
Better Resource Management:
Centralized progress tracking
Isolated queue operations
Cleaner cleanup processes
Optimized Imports:
Components can be imported individually as needed
Main processor.py provides backward compatibility
Clear module interface through init.py
2024-11-15 18:58:05 +00:00