feat(jobs): surface background jobs with progress, logs and controls
Add a central job registry that library scans and search index builds report into, so background work is visible instead of buried in the settings page. - backend/jobs: registry with per-job ring-buffer logs, capability-driven controls, and one coalesced JobsChanged snapshot at 4Hz - pause survives restart via a job_state table; a paused scan is adopted back on launch and skipped by the soft scan - top-bar indicator, popover, details drawer and a Jobs page replacing the config page's scan UI; per-library start/stop retained - scan timing breakdown moves into the job log, Full rescan to the Jobs page; delete the orphaned library-manager component Also add cmd/indexbuild and cmd/indexexport so the explore index can be built once centrally rather than by every install, which today streams ~205GB from the ListenBrainz spark dump on first run. indexbuild picks build/refresh/rebuild from index state; the Gitea workflow runs it on push, weekly, or manually and publishes only when content changed. fresh-install no longer defaults YJ_HOME under /tmp: it is tmpfs on most distros, and the import needs ~6GB of real disk. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
+5
@@ -3,6 +3,7 @@
|
||||
import {sqlcgen} from '../models';
|
||||
import {library} from '../models';
|
||||
import {context} from '../models';
|
||||
import {jobs} from '../models';
|
||||
|
||||
export function AcquirePipelineLock():Promise<void>;
|
||||
|
||||
@@ -66,6 +67,8 @@ export function RemoveLibrary(arg1:number):Promise<library.RemovalSummary>;
|
||||
|
||||
export function RenameLibrary(arg1:number,arg2:string):Promise<void>;
|
||||
|
||||
export function RestorePausedScans():Promise<void>;
|
||||
|
||||
export function ResumeScan():Promise<void>;
|
||||
|
||||
export function ScanAllLibraries():Promise<void>;
|
||||
@@ -78,6 +81,8 @@ export function SearchTracksByLibrary(arg1:string,arg2:number):Promise<Array<lib
|
||||
|
||||
export function SetContext(arg1:context.Context):Promise<void>;
|
||||
|
||||
export function SetJobRegistry(arg1:jobs.Registry):Promise<void>;
|
||||
|
||||
export function SetRemovalHooks(arg1:library.RemovalHooks):Promise<void>;
|
||||
|
||||
export function SetRescanHooks(arg1:library.RescanHooks):Promise<void>;
|
||||
|
||||
@@ -126,6 +126,10 @@ export function RenameLibrary(arg1, arg2) {
|
||||
return window['go']['library']['Library']['RenameLibrary'](arg1, arg2);
|
||||
}
|
||||
|
||||
export function RestorePausedScans() {
|
||||
return window['go']['library']['Library']['RestorePausedScans']();
|
||||
}
|
||||
|
||||
export function ResumeScan() {
|
||||
return window['go']['library']['Library']['ResumeScan']();
|
||||
}
|
||||
@@ -150,6 +154,10 @@ export function SetContext(arg1) {
|
||||
return window['go']['library']['Library']['SetContext'](arg1);
|
||||
}
|
||||
|
||||
export function SetJobRegistry(arg1) {
|
||||
return window['go']['library']['Library']['SetJobRegistry'](arg1);
|
||||
}
|
||||
|
||||
export function SetRemovalHooks(arg1) {
|
||||
return window['go']['library']['Library']['SetRemovalHooks'](arg1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user