diff options
author | Gabriel Arakaki Giovanini <mail@gabrielgio.me> | 2023-06-26 21:40:40 +0200 |
---|---|---|
committer | Gabriel Arakaki Giovanini <mail@gabrielgio.me> | 2023-06-26 21:42:17 +0200 |
commit | d4e1ca3a48e74573df6965ceee217e119ff899ae (patch) | |
tree | cbe4f1e981aa67a1a2bca62b20d9687b3550af3d /cmd | |
parent | e1c8bb1bd5381d8ade3c699a2d6b4fb373112880 (diff) | |
download | lens-d4e1ca3a48e74573df6965ceee217e119ff899ae.tar.gz lens-d4e1ca3a48e74573df6965ceee217e119ff899ae.tar.bz2 lens-d4e1ca3a48e74573df6965ceee217e119ff899ae.zip |
feat: Add scheduler to chan processor
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/server/main.go | 8 |
1 files changed, 6 insertions, 2 deletions
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"), |