This commit is contained in:
pacnpal
2024-11-15 02:51:20 +00:00
parent 8fcdec7550
commit f943503f54
2 changed files with 5 additions and 0 deletions

View File

@@ -239,6 +239,7 @@ class EnhancedVideoQueueManager:
Args:
processor: A callable that takes a QueueItem and returns a tuple of (success: bool, error: Optional[str])
"""
logger.info("Queue processor started and waiting for items...")
while True:
try:
# Get next item from queue
@@ -249,6 +250,7 @@ class EnhancedVideoQueueManager:
self._processing[item.url] = item
item.status = "processing"
item.processing_time = time.time()
logger.info(f"Processing queue item: {item.url}")
if not item:
await asyncio.sleep(1)

View File

@@ -45,10 +45,13 @@ class VideoProcessor:
self._failed_downloads_lock = asyncio.Lock()
# Start queue processing
logger.info("Starting video processing queue...")
self._queue_task = asyncio.create_task(self.queue_manager.process_queue(self._process_video))
logger.info("Video processing queue started successfully")
async def _process_video(self, item: Any) -> Tuple[bool, Optional[str]]:
"""Process a video from the queue"""
logger.info(f"Processing video from queue: {item.url}")
try:
# Get the message
channel = self.bot.get_channel(item.channel_id)