fix bugs
parent
2cb9d67a70
commit
29dd08081b
|
|
@ -78,6 +78,7 @@ async def create_db_tables():
|
||||||
from app.song.models import Song, SongTimestamp # noqa: F401
|
from app.song.models import Song, SongTimestamp # noqa: F401
|
||||||
from app.video.models import Video # noqa: F401
|
from app.video.models import Video # noqa: F401
|
||||||
from app.sns.models import SNSUploadTask # noqa: F401
|
from app.sns.models import SNSUploadTask # noqa: F401
|
||||||
|
from app.social.models import SocialUpload # noqa: F401
|
||||||
|
|
||||||
# 생성할 테이블 목록
|
# 생성할 테이블 목록
|
||||||
tables_to_create = [
|
tables_to_create = [
|
||||||
|
|
@ -91,6 +92,7 @@ async def create_db_tables():
|
||||||
SongTimestamp.__table__,
|
SongTimestamp.__table__,
|
||||||
Video.__table__,
|
Video.__table__,
|
||||||
SNSUploadTask.__table__,
|
SNSUploadTask.__table__,
|
||||||
|
SocialUpload.__table__,
|
||||||
]
|
]
|
||||||
|
|
||||||
logger.info("Creating database tables...")
|
logger.info("Creating database tables...")
|
||||||
|
|
|
||||||
|
|
@ -568,7 +568,6 @@ async def get_video_status(
|
||||||
video_url=video_url,
|
video_url=video_url,
|
||||||
creatomate_render_id=creatomate_render_id,
|
creatomate_render_id=creatomate_render_id,
|
||||||
user_uuid=current_user.user_uuid,
|
user_uuid=current_user.user_uuid,
|
||||||
creatomate_render_id=creatomate_render_id,
|
|
||||||
)
|
)
|
||||||
elif video and video.status == "completed":
|
elif video and video.status == "completed":
|
||||||
logger.debug(
|
logger.debug(
|
||||||
|
|
|
||||||
|
|
@ -107,7 +107,6 @@ async def download_and_upload_video_to_blob(
|
||||||
video_url: str,
|
video_url: str,
|
||||||
creatomate_render_id: str,
|
creatomate_render_id: str,
|
||||||
user_uuid: str,
|
user_uuid: str,
|
||||||
creatomate_render_id: str | None = None,
|
|
||||||
) -> None:
|
) -> None:
|
||||||
"""백그라운드에서 영상을 다운로드하고 Azure Blob Storage에 업로드한 뒤 Video 테이블을 업데이트합니다.
|
"""백그라운드에서 영상을 다운로드하고 Azure Blob Storage에 업로드한 뒤 Video 테이블을 업데이트합니다.
|
||||||
|
|
||||||
|
|
@ -116,9 +115,8 @@ async def download_and_upload_video_to_blob(
|
||||||
Args:
|
Args:
|
||||||
task_id: 프로젝트 task_id
|
task_id: 프로젝트 task_id
|
||||||
video_url: 다운로드할 영상 URL
|
video_url: 다운로드할 영상 URL
|
||||||
creatomate_render_id: Creatomate API 렌더 ID (파일명으로 사용)
|
creatomate_render_id: Creatomate API 렌더 ID (파일명 및 Video 식별용)
|
||||||
user_uuid: 사용자 UUID (Azure Blob Storage 경로에 사용)
|
user_uuid: 사용자 UUID (Azure Blob Storage 경로에 사용)
|
||||||
creatomate_render_id: Creatomate 렌더 ID (특정 Video 식별용)
|
|
||||||
"""
|
"""
|
||||||
logger.info(f"[download_and_upload_video_to_blob] START - task_id: {task_id}, creatomate_render_id: {creatomate_render_id}")
|
logger.info(f"[download_and_upload_video_to_blob] START - task_id: {task_id}, creatomate_render_id: {creatomate_render_id}")
|
||||||
temp_file_path: Path | None = None
|
temp_file_path: Path | None = None
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue