Repository navigation
feat: retry a job from history with the same parameters - #48
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/retrythat starts a new job with the same params:handle_transcriptiongains asource_filebranch that copies it under the new job id); if it's gone, returns 410 "please re-upload".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/retry404s whenENABLE_HISTORY=False../scripts/docker_e2e.sh— PASS.