Improve Scan, Seperate Hashing
All checks were successful
/ release (push) Successful in 42s

This commit is contained in:
Samuel Lorch 2024-07-07 01:12:01 +02:00
parent cd3c06d7d0
commit e47a254cad
8 changed files with 178 additions and 55 deletions

View file

@ -126,8 +126,11 @@ func Start(_conf config.Config, tmplFS embed.FS, staticFS embed.FS, migrationsFS
serverClose <- true
}()
stopCleanup := make(chan bool, 1)
go manageWorkers(stopCleanup)
stopWorkerManagement := make(chan bool, 1)
go manageWorkers(stopWorkerManagement)
stopScanning := make(chan bool, 1)
go manageScan(stopScanning)
sigs := make(chan os.Signal, 1)
signal.Notify(sigs, os.Interrupt)
@ -139,7 +142,10 @@ func Start(_conf config.Config, tmplFS embed.FS, staticFS embed.FS, migrationsFS
stopCtx, cancel := context.WithTimeout(context.Background(), time.Second*10)
server.Shutdown(stopCtx)
cancel()
stopCleanup <- true
slog.Info("Stopping Worker Management...")
stopWorkerManagement <- true
slog.Info("Stopping Scanning...")
stopScanning <- true
slog.Info("Done")
}
}