Skip to content

Offline fix#1484

Open
Tophness wants to merge 1 commit intomainfrom
offline_fix
Open

Offline fix#1484
Tophness wants to merge 1 commit intomainfrom
offline_fix

Conversation

@Tophness
Copy link
Collaborator

@Tophness Tophness commented Feb 3, 2026

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_tasks runs 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 (the while loop) was intertwined with the UI update logic.

If the connection drops, and yield fails or blocks significantly, the main loop controlling the queue might get stuck or terminate prematurely, preventing the next generate_video call 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_tasks then becomes just a passive listener. If you disconnect, process_tasks might stop receiving updates, but the background thread will keep iterating through the queue and generating videos happily on its own.

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