From 5f660b309bc695277c67223520499fcc13f3c59f Mon Sep 17 00:00:00 2001 From: Gabriel Arakaki Giovanini Date: Mon, 31 Jul 2023 18:25:13 +0200 Subject: feat: Add album scanner --- cmd/server/main.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'cmd/server/main.go') diff --git a/cmd/server/main.go b/cmd/server/main.go index 39987e5..a3d5124 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -118,6 +118,7 @@ func main() { fileScanner = scanner.NewFileScanner(mediaRepository, userRepository) exifScanner = scanner.NewEXIFScanner(mediaRepository) thumbnailScanner = scanner.NewThumbnailScanner(*cachePath, mediaRepository) + albumScanner = scanner.NewAlbumScanner(mediaRepository) ) // worker @@ -138,6 +139,11 @@ func main() { scheduler, logrus.WithField("context", "thumbnail scanner"), ) + albumWorker = worker.NewWorkerFromSerialProcessor[*repository.Media]( + albumScanner, + scheduler, + logrus.WithField("context", "thumbnail scanner"), + ) ) pool := worker.NewWorkerPool() @@ -145,6 +151,7 @@ func main() { pool.AddWorker("exif scanner", exifWorker) pool.AddWorker("file scanner", fileWorker) pool.AddWorker("thumbnail scanner", thumbnailWorker) + pool.AddWorker("album scanner", albumWorker) ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt) defer stop() -- cgit v1.2.3