add login

This commit is contained in:
jaehwang committed 2026-09-15 16:00:54 +09:00
1 parent b27a7b528a
commit c4efd6406d
22 files changed
+786 -17

No files matched your search

+4 -1
View File
@@ -24,6 +24,7 @@ from services.render import render
from services.tts import synthesize
from services.upscale_poster import as_png_path
from tables.task import PosterAliveTask, new_task_id
from tables.user import UNASSIGNED_USER_ID
from utils import blob
from utils.image import sniff_extension
@@ -31,10 +32,12 @@ PIPELINE = "poster_alive"
async def create_task(session: AsyncSession, name: str, poster: bytes, *,
skip_review: bool = False) -> PosterAliveTask:
skip_review: bool = False,
user_id: str = UNASSIGNED_USER_ID) -> PosterAliveTask:
# poster_url이 NOT NULL이라 blob에 올린 뒤에야 행을 넣을 수 있다.
# 그 경로에 id가 필요하므로 여기서 미리 만든다
task = PosterAliveTask(id=new_task_id(), name=name, skip_review=skip_review,
user_id=user_id,
stage_timings=initial_timings(PosterAliveState))
with Image.open(io.BytesIO(poster)) as image:
task.poster_width, task.poster_height = image.size