fix(quick-video): no reanudar batches cancelados tras un reinicio - #15
Merged
Conversation
recover() trataba status=cancelling como trabajo activo y lo reescribía a queued, así que un Cancel seguido de crash/reinicio volvía a gastar GPU en un lote que el usuario ya había parado. Co-authored-by: ignaciodelcano+dcl <ignaciodelcano+dcl@gmail.com>
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.


Un lote de Quick Video en
cancellingse persistía así si Cancel coincidía con un cierre, crash o reinicio.recover()tratabacancellingcomo estado activo, lo reescribía aqueuedy arrancaba un worker. El usuario había pedido parar; el lote volvía a gastar GPU.Qué cambia
cancellingse finaliza comocancelledy no relanza el worker.planning/runningde ese lote también quedancancelled.queued/runninginterrumpidos siguen recuperándose como hasta ahora.Cómo reproducir
cancelling) y cerrar/matar el proceso antes de que el worker persistacancelled.GET /api/v1/stories/quick-video-batches(o el recover de arranque) reencolaba el lote.Validación
pytest tests/test_quick_video_batches.py— 11 passed.Note
Medium Risk
Touches durable job recovery and cancel semantics; a mistake could either skip legitimate restarts or still relaunch cancelled GPU work. Scope is a small, well-tested branch in
recover().Overview
Stops overnight Quick Video recovery from treating a persisted
cancellingcheckpoint as an interrupted run. After a crash or restart mid-cancel,recover()now finalizes the batch (and in-flightplanning/runningitems) ascancelled, publishes that snapshot, and does not start a worker.queued/runningjobs still get the existing interrupt-and-requeue path. A regression test seeds a stalecancellingcheckpoint and asserts listing does not relaunch GPU work.Reviewed by Cursor Bugbot for commit ccbe754. Configure here.