mirror of
https://github.com/lukaszraczylo/gohoarder.git
synced 2026-11-26 06:37:07 +00:00
feat(rescan): limit rescans to active packages and run them in parallel
security.rescan_active_window skips packages not requested within the window. security.rescan_concurrency runs a bounded pool of scans per cycle. The cycle summary reports skips by reason. Both options default to the previous behaviour.
This commit is contained in:
+4
-1
@@ -320,7 +320,10 @@ func (a *App) initializeComponents() error {
|
||||
// Initialize rescan worker if enabled
|
||||
if a.config.Security.Enabled && a.config.Security.RescanInterval > 0 {
|
||||
log.Info().Dur("interval", a.config.Security.RescanInterval).Msg("Initializing package rescan worker")
|
||||
a.rescanWorker = scanner.NewRescanWorker(a.scanManager, a.metadata, a.config.Security.RescanInterval)
|
||||
a.rescanWorker = scanner.NewRescanWorker(a.scanManager, a.metadata, a.config.Security.RescanInterval,
|
||||
scanner.WithActiveWindow(a.config.Security.RescanActiveWindow),
|
||||
scanner.WithConcurrency(a.config.Security.RescanConcurrency),
|
||||
)
|
||||
}
|
||||
|
||||
// Initialize WebSocket server
|
||||
|
||||
Reference in New Issue
Block a user