From 9ba05d26ee2382f3191e25ae7af5d462ba2a35e4 Mon Sep 17 00:00:00 2001 From: Gabriel Arakaki Giovanini Date: Sun, 18 Jun 2023 17:02:07 +0200 Subject: fix: Fix linter issues --- cmd/server/main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cmd') 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() } -- cgit v1.2.3