Skip to content

Fix backup button staying greyed out after job completion (#2339)#2347

Merged
m3nu merged 2 commits intomasterfrom
fix/backup-button-greyed-out-2339
Jan 23, 2026
Merged

Fix backup button staying greyed out after job completion (#2339)#2347
m3nu merged 2 commits intomasterfrom
fix/backup-button-greyed-out-2339

Conversation

@m3nu
Copy link
Contributor

@m3nu m3nu commented Jan 20, 2026

Summary

Fixes #2339 - After a backup completes successfully, the "Start Backup" button stays greyed out despite the status showing "Finished Backup".

Root Cause: The backup_finished_event signal is emitted from within job.run(), but is_worker_running() checks Thread.is_alive() which returns True because the thread hasn't fully terminated yet. This race condition causes buttons to remain disabled.

Fix: Clear current_job after job.run() returns and check both is_alive() AND current_job is not None in is_worker_running(). This correctly detects job completion even while the thread is technically still alive.

Changes

  • SiteWorker.run(): Clear current_job = None after job completes
  • is_worker_running(): Check both thread liveness and current_job state
  • cancel_all_jobs(): Guard against None current_job

Test plan

  • Unit tests pass (183 passed)
  • Linter passes
  • Manual test: Start backup → wait for completion → verify button re-enables immediately
  • Manual test: Cancel backup → verify button re-enables
  • Manual test: Queue multiple jobs → verify button stays disabled until all complete

m3nu and others added 2 commits January 20, 2026 19:53
The backup_finished_event signal was emitted from within job.run(),
but is_worker_running() checked Thread.is_alive() which returned True
because the thread hadn't exited yet. This race condition caused the
UI buttons to remain disabled after backup completion.

Fix by clearing current_job after job.run() returns and checking both
is_alive() and current_job in is_worker_running(). This correctly
detects job completion even while the thread is still alive.
@m3nu m3nu merged commit b7bc469 into master Jan 23, 2026
2 of 5 checks passed
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.

Start Backup greyed out after finishing the backup

1 participant