diff --git a/backend/app/api/v1/modules.py b/backend/app/api/v1/modules.py index b7f720b..7c4fa15 100644 --- a/backend/app/api/v1/modules.py +++ b/backend/app/api/v1/modules.py @@ -23,7 +23,7 @@ from app.services import ( markdown_tools, sound_effects ) -from app.workers.tasks import process_video_generation +from app.workers.tasks import process_video_generation, process_image_upscaling router = APIRouter() @@ -347,7 +347,8 @@ async def upscale_image( db.commit() db.refresh(job) - background_tasks.add_task(image_upscaler.upscale, str(job.id)) + # Offload to Celery Worker (Redis) for scalability + process_image_upscaling.delay(str(job.id)) return job_response(job)