Open
Conversation
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.
Preliminary offline fix.
Going to try to fix it entirely with this PR eventually, but so far I've stopped it terminating the actual generation thread when internet disconnects.
The UI still errors out as it always does, but your videos will keep generating and you can ctrl+c to save the queue, so that's a massive improvement.
The issue was that
process_tasksruns the queue processing loop in the same context that yields updates to the UI. The logic that iterates to the next item in the queue (thewhileloop) was intertwined with the UI update logic.If the connection drops, and
yieldfails or blocks significantly, the main loop controlling the queue might get stuck or terminate prematurely, preventing the nextgenerate_videocall from starting.To fix this properly, we need to completely decouple the Queue Runner (which does the work) from the UI Reporter (which tells you what's happening).
With this solution,
process_tasksthen becomes just a passive listener. If you disconnect,process_tasksmight stop receiving updates, but the background thread will keep iterating through the queue and generating videos happily on its own.