diff options
author | Gabriel Arakaki Giovanini <mail@gabrielgio.me> | 2023-07-31 18:25:13 +0200 |
---|---|---|
committer | Gabriel Arakaki Giovanini <mail@gabrielgio.me> | 2023-08-06 18:41:34 +0200 |
commit | 5f660b309bc695277c67223520499fcc13f3c59f (patch) | |
tree | ce30f46d8feebac6eb3f5145e9c772be1c32f4ad /cmd/server | |
parent | 5168a9476f0e83264ecafc85bc9145e8bdcbb8dc (diff) | |
download | lens-5f660b309bc695277c67223520499fcc13f3c59f.tar.gz lens-5f660b309bc695277c67223520499fcc13f3c59f.tar.bz2 lens-5f660b309bc695277c67223520499fcc13f3c59f.zip |
feat: Add album scanner
Diffstat (limited to 'cmd/server')
-rw-r--r-- | cmd/server/main.go | 7 |
1 files changed, 7 insertions, 0 deletions
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() |