lyric 생성 시점에 subtitle 생성하도록 DB 및 코드 변경
This commit is contained in:
1 parent
7da6ab6ec0
commit
395b4dbbfb
6 files changed
+114
-22
No files matched your search
@@ -41,7 +41,7 @@ from app.lyric.schemas.lyric import (
|
||||
LyricListItem,
|
||||
LyricStatusResponse,
|
||||
)
|
||||
from app.lyric.worker.lyric_task import generate_lyric_background
|
||||
from app.lyric.worker.lyric_task import generate_lyric_background, generate_subtitle_background
|
||||
from app.utils.chatgpt_prompt import ChatgptService
|
||||
from app.utils.logger import get_logger
|
||||
from app.utils.pagination import PaginatedResponse, get_paginated
|
||||
@@ -351,7 +351,7 @@ async def generate_lyric(
|
||||
# ========== Step 4: 백그라운드 태스크 스케줄링 ==========
|
||||
step4_start = time.perf_counter()
|
||||
logger.debug(f"[generate_lyric] Step 4: 백그라운드 태스크 스케줄링...")
|
||||
|
||||
orientation = request_body.orientation
|
||||
background_tasks.add_task(
|
||||
generate_lyric_background,
|
||||
task_id=task_id,
|
||||
@@ -359,6 +359,12 @@ async def generate_lyric(
|
||||
lyric_input_data=lyric_input_data,
|
||||
lyric_id=lyric.id,
|
||||
)
|
||||
|
||||
background_tasks.add_task(
|
||||
generate_subtitle_background,
|
||||
orientation = orientation,
|
||||
task_id=task_id
|
||||
)
|
||||
|
||||
step4_elapsed = (time.perf_counter() - step4_start) * 1000
|
||||
logger.debug(f"[generate_lyric] Step 4 완료 ({step4_elapsed:.1f}ms)")
|
||||
|
||||
Reference in new issue
Block a user