fix(app): start the rescan worker

The app created the rescan worker when security.rescan_interval was set but never started it; only Shutdown called Stop. A scan lost to a restart therefore left its package unscanned for good, and old results were never refreshed with new CVEs. startWorkers now starts the worker. The ledger records it as GH-24.
This commit is contained in:
2026-11-23 17:24:55 +00:00
parent a83cc20058
commit 378b8731fc
3 changed files with 62 additions and 0 deletions
+5
View File
@@ -617,6 +617,11 @@ func (a *App) startWorkers(ctx context.Context) {
// Start periodic stats broadcaster (every 30s) so connected WS clients
// see live counter updates without polling.
go a.startStatsBroadcaster(ctx)
// Re-scans artifacts whose scan was lost to a restart and refreshes old results.
if a.rescanWorker != nil {
go a.rescanWorker.Start(ctx)
}
}
func (a *App) Run() error {