diff --git a/backend/app/services/video_renderer.py b/backend/app/services/video_renderer.py index 51cdab6..188207d 100644 --- a/backend/app/services/video_renderer.py +++ b/backend/app/services/video_renderer.py @@ -50,6 +50,7 @@ class VideoRendererService: Raises: FFmpegExecutionError: If the command fails """ + from celery.result import allow_join_result from ..tasks.ffmpeg_operations import run_ffmpeg_command # Dispatch to ffmpeg queue @@ -62,8 +63,10 @@ class VideoRendererService: while not task_result.ready(): await asyncio.sleep(0.5) - # Get result (should be ready, short timeout for safety) - result = task_result.get(timeout=30) + # Get result - use allow_join_result since we're calling from within a task + # This is safe because we've already confirmed the task is complete via ready() + with allow_join_result(): + result = task_result.get(timeout=30) if not result['success']: raise FFmpegExecutionError( @@ -85,6 +88,7 @@ class VideoRendererService: Raises: FFmpegExecutionError: If the command fails """ + from celery.result import allow_join_result from ..tasks.ffmpeg_operations import run_ffprobe_command # Dispatch to ffmpeg queue @@ -97,8 +101,10 @@ class VideoRendererService: while not task_result.ready(): await asyncio.sleep(0.2) - # Get result - result = task_result.get(timeout=30) + # Get result - use allow_join_result since we're calling from within a task + # This is safe because we've already confirmed the task is complete via ready() + with allow_join_result(): + result = task_result.get(timeout=30) if not result['success']: raise FFmpegExecutionError(