From d4e1ca3a48e74573df6965ceee217e119ff899ae Mon Sep 17 00:00:00 2001 From: Gabriel Arakaki Giovanini Date: Mon, 26 Jun 2023 21:40:40 +0200 Subject: feat: Add scheduler to chan processor --- cmd/server/main.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'cmd/server') diff --git a/cmd/server/main.go b/cmd/server/main.go index d7c2fd6..f58366f 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -118,8 +118,12 @@ func main() { // worker var ( serverWorker = worker.NewServerWorker(&fasthttp.Server{Handler: r.Handler}) - fileWorker = worker.NewWorkerFromChanProcessor[string](fileScanner, scheduler) - exifWorker = worker.NewWorkerFromBatchProcessor[*media.Media]( + fileWorker = worker.NewWorkerFromChanProcessor[string]( + fileScanner, + scheduler, + logrus.WithField("context", "file scanner"), + ) + exifWorker = worker.NewWorkerFromBatchProcessor[*media.Media]( exifScanner, scheduler, logrus.WithField("context", "exif scanner"), -- cgit v1.2.3