Commit Graph

16 Commits

Author SHA1 Message Date
pacnpal
df9099f2c8 diabolical 2024-11-18 05:17:37 +00:00
pacnpal
7276e37cab y 2024-11-18 00:51:55 +00:00
pacnpal
afe0e96b14 Adding queue.types to the module reload list in the main init.py
Properly exposing QueueProcessor in processor/init.py
Updating queue/init.py to import and expose all necessary types (QueuePriority, ProcessingMetrics)
Ensuring consistent import patterns across the codebase
The changes maintain the cog's architecture while fixing the import issues:

Module reloading system now includes all dependencies
Package hierarchy properly exposes all needed types
Import structure is consistent across components
All necessary types and models are accessible
2024-11-17 23:51:11 +00:00
pacnpal
6647c93a44 fix(processor): add fallback to absolute imports in reactions.py 2024-11-17 23:06:22 +00:00
pacnpal
643763db0a fix(processor): add fallback to absolute imports in __init__.py 2024-11-17 22:52:16 +00:00
pacnpal
91e34a6639 fix(processor): correct relative import path for progress_tracker 2024-11-17 21:47:26 +00:00
pacnpal
1fdabee127 Fix: Update processor/__init__.py to use relative imports to resolve ModuleNotFoundError 2024-11-17 20:20:39 +00:00
pacnpal
97dd6d72f2 loads of import fixes 2024-11-17 19:47:18 +00:00
pacnpal
62c97f0b01 Converted all 'from videoarchiver.' imports to relative imports 2024-11-17 16:05:12 +00:00
pacnpal
c830be2841 videoarchiver/config/validation_manager.py
videoarchiver/config/role_manager.py
videoarchiver/database/connection_manager.py
videoarchiver/database/schema_manager.py
videoarchiver/queue/cleaners/tracking_cleaner.py
videoarchiver/exceptions.py
videoarchiver/processor.py
videoarchiver/commands.py
videoarchiver/update_checker.py
videoarchiver/utils/path_manager.py
videoarchiver/utils/file_ops.py
videoarchiver/processor/message_validator.py
videoarchiver/utils/download_manager.py
2024-11-17 06:12:41 +00:00
pacnpal
0d67bcc4a7 lol 2024-11-17 02:10:22 +00:00
pacnpal
2557978cf3 lol 2024-11-17 01:03:45 +00:00
pacnpal
dac21f2fcd fixed 2024-11-16 22:32:08 +00:00
pacnpal
dd467df5fc Created a new constants.py file to store the REACTIONS dictionary
Updated all files to import REACTIONS from constants.py instead of reactions.py:
queue_processor.py
message_handler.py
reactions.py (now only contains reaction handling functions)
events.py (now imports REACTIONS from constants.py and handle_archived_reaction from reactions.py)
core.py
queue_handler.py
processor/init.py
2024-11-16 18:12:35 +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
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