fix frontend bug
This commit is contained in:
1 parent
a18f7a5c8b
commit
9bb46f7004
10 files changed
+83
-21
No files matched your search
@@ -10,7 +10,7 @@ from models.pipeline_state import PlayreelState
|
||||
from pipelines import playreel
|
||||
from pipelines.gate import (REVERSIBLE_GATES, PlayreelGate, apply_playreel_edits,
|
||||
previous_gate, resume_stage)
|
||||
from pipelines.runner import AWAITING_REVIEW, FAILED, QUEUED, RUNNING, reset_from
|
||||
from pipelines.runner import AWAITING_REVIEW, DONE, FAILED, QUEUED, RUNNING, reset_from
|
||||
from routers.view import playreel_view
|
||||
from tables.task import PlayreelTask
|
||||
from utils.database import get_session
|
||||
@@ -119,6 +119,9 @@ async def back(task_id: str, session: AsyncSession = Depends(get_session)):
|
||||
async def retry(task_id: str, session: AsyncSession = Depends(get_session)):
|
||||
"""실패 재시도와 클립 재생성. i2v를 다시 돌리면 크레딧이 다시 든다"""
|
||||
task = await find_task(session, task_id)
|
||||
# 끝난 것을 다시 돌리면 크레딧만 나간다. 새로 만들 거면 새 잡이다
|
||||
if task.status == DONE:
|
||||
raise HTTPException(409, "이미 끝난 작업입니다")
|
||||
restart = (PlayreelState.I2V.value if task.gate == PlayreelGate.CLIP_CONFIRM
|
||||
else task.error_stage or PlayreelState.FETCH.value)
|
||||
reset_from(task, restart)
|
||||
|
||||
Reference in new issue
Block a user