fix: retry legacy tiktok jobs

This commit is contained in:
2026-05-18 17:46:52 +08:00
parent 92f04f1a7e
commit e19e5db595

View File

@@ -3297,7 +3297,8 @@ async def retry_job_download(job_id: str, bg: BackgroundTasks) -> Job:
job = JOBS.get(job_id)
if not job:
raise HTTPException(404, "job not found")
if job.source_kind == "upload" or job.url.startswith("upload://"):
source_kind = getattr(job, "source_kind", "")
if source_kind == "upload" or job.url.startswith("upload://"):
raise HTTPException(409, "uploaded videos cannot be redownloaded; upload the file again")
if job.status in {"downloading", "splitting", "transcribing"}:
raise HTTPException(409, f"job is busy: {job.status}")