aboutsummaryrefslogtreecommitdiff
path: root/cmd/server
diff options
context:
space:
mode:
authorGabriel Arakaki Giovanini <mail@gabrielgio.me>2023-06-18 17:02:07 +0200
committerGabriel Arakaki Giovanini <mail@gabrielgio.me>2023-06-18 17:02:07 +0200
commit9ba05d26ee2382f3191e25ae7af5d462ba2a35e4 (patch)
tree5e7bd0e1c01b11bfeac7c59b2739ac1dcf68492d /cmd/server
parentc8e1328164e9ffbd681c3c0e449f1e6b9856b896 (diff)
downloadlens-9ba05d26ee2382f3191e25ae7af5d462ba2a35e4.tar.gz
lens-9ba05d26ee2382f3191e25ae7af5d462ba2a35e4.tar.bz2
lens-9ba05d26ee2382f3191e25ae7af5d462ba2a35e4.zip
fix: Fix linter issues
Diffstat (limited to 'cmd/server')
-rw-r--r--cmd/server/main.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/server/main.go b/cmd/server/main.go
index 375a26c..59ea957 100644
--- a/cmd/server/main.go
+++ b/cmd/server/main.go
@@ -90,14 +90,14 @@ func main() {
exifScanner = worker.NewEXIFScanner(root, mediaRepository)
)
- ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt)
- defer stop()
-
pool := worker.NewWorkerPool()
pool.AddWorker("http server", serverWorker)
pool.AddWorker("exif scanner", worker.NewWorkerFromListProcessor[*media.Media](exifScanner, scheduler))
pool.AddWorker("file scanner", worker.NewWorkerFromChanProcessor[string](fileScanner, scheduler))
+ ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt)
+ defer stop()
+
pool.Start(ctx)
pool.Wait()
}