크레아토 완료
This commit is contained in:
1 parent
586dd5ccc9
commit
52520d770b
6 files changed
+362
-60
No files matched your search
@@ -252,7 +252,8 @@ async def get_song_status(
|
||||
)
|
||||
song = song_result.scalar_one_or_none()
|
||||
|
||||
if song:
|
||||
if song and song.status != "completed":
|
||||
# 이미 완료된 경우 백그라운드 작업 중복 실행 방지
|
||||
# project_id로 Project 조회하여 store_name 가져오기
|
||||
project_result = await session.execute(
|
||||
select(Project).where(Project.id == song.project_id)
|
||||
@@ -269,6 +270,8 @@ async def get_song_status(
|
||||
audio_url=audio_url,
|
||||
store_name=store_name,
|
||||
)
|
||||
elif song and song.status == "completed":
|
||||
print(f"[get_song_status] SKIPPED - Song already completed, suno_task_id: {suno_task_id}")
|
||||
|
||||
print(f"[get_song_status] SUCCESS - suno_task_id: {suno_task_id}")
|
||||
return parsed_response
|
||||
@@ -289,9 +292,9 @@ async def get_song_status(
|
||||
|
||||
@router.get(
|
||||
"/download/{task_id}",
|
||||
summary="노래 다운로드 상태 조회",
|
||||
summary="노래 생성 URL 조회",
|
||||
description="""
|
||||
task_id를 기반으로 Song 테이블의 상태를 polling하고,
|
||||
task_id를 기반으로 Song 테이블의 상태를 조회하고,
|
||||
completed인 경우 Project 정보와 노래 URL을 반환합니다.
|
||||
|
||||
## 경로 파라미터
|
||||
|
||||
Reference in new issue
Block a user