Skip to content

feat: retry a job from history with the same parameters - #48

Merged
lkmeta merged 1 commit into
mainfrom
feat/retry-from-history
Aug 15, 2026
Merged

lkmeta merged 1 commit into
mainfrom
feat/retry-from-history

Conversation

@lkmeta

@lkmeta lkmeta commented Aug 15, 2026

Copy link
Copy Markdown
Owner

Problem

The submit-time "Try again" (PR #47) only helps at start; a failed job in history had no way to re-run — you'd have to re-enter everything.

Change

A Retry action on failed/canceled history rows + POST /history/retry that starts a new job with the same params:

  • YouTube → re-runs from the stored URL (fully automatic).
  • Upload → reuses the source file if still on disk (handle_transcription gains a source_file branch that copies it under the new job id); if it's gone, returns 410 "please re-upload".
  • Refuses in-flight jobs (409) and honors the concurrency cap (429).

Evidence

  • pytest — 74 passed: YouTube retry starts a new job with the same URL; refuses a running job; upload reuses its source; missing source → 410; /history/retry 404s when ENABLE_HISTORY=False.
  • Against the container: transcribed a fixture (job A) → retried it → job B re-ran from the reused file to "Completed successfully!"; Retry buttons render on failed rows; 0 JS errors.
  • ./scripts/docker_e2e.sh — PASS.

Add a Retry action on failed/canceled history rows (and POST /history/retry)
that re-runs a past job as a NEW job with the same settings. YouTube re-runs
from the stored URL; an upload reuses its source file if it's still on disk
(handle_transcription gains a source_file branch that copies it under the new
job id), otherwise the user is told to re-upload (410). Refuses in-flight jobs
and honors the concurrency cap.

Verified: pytest 74 (youtube retry starts a new job; refuses running; upload
reuses source; missing source -> 410; 404 when history disabled); against the
container a completed fixture job retried and re-ran to "Completed
successfully!"; docker_e2e.sh PASS.
@lkmeta
lkmeta merged commit 6dd1ef1 into main Aug 15, 2026
4 checks passed
@lkmeta
lkmeta deleted the feat/retry-from-history branch August 15, 2026 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant