aboutsummaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/server/main.go7
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()