feat(jobs): register the autotag apply, and ask before quitting
The apply was a bare goroutine whose progress lived in a component field discarded on navigation, with no cancel and no record of where it stopped if the app quit while it was rewriting tags — beside a registry that gives every other long-running operation exactly those things. `jobs.KindAutotagApply` now carries progress, a cancel wired to the apply's context, and a terminal state that tells cancelled from failed. `OnBeforeClose` returns false unconditionally today; it now asks while a file-writing job is in flight. Still not durable: quitting cancels cleanly but nothing records where it stopped for the next launch. That belongs with the deferred download/jobs work.
This commit is contained in:
@@ -22,9 +22,10 @@ type Kind string
|
||||
|
||||
// Job kinds.
|
||||
const (
|
||||
KindLibraryScan Kind = "library-scan"
|
||||
KindIndexBuild Kind = "index-build"
|
||||
KindDownload Kind = "download"
|
||||
KindLibraryScan Kind = "library-scan"
|
||||
KindIndexBuild Kind = "index-build"
|
||||
KindDownload Kind = "download"
|
||||
KindAutotagApply Kind = "autotag-apply"
|
||||
)
|
||||
|
||||
// State is the lifecycle position of a job.
|
||||
|
||||
Reference in New Issue
Block a user