From 31de625d042d2ebfe7cc63853af57d59cc7f68c9 Mon Sep 17 00:00:00 2001 From: Andre Medeiros Date: Wed, 2 Nov 2022 18:29:52 -0400 Subject: [PATCH] reduce prefetch --- internal/worker/notifications.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/internal/worker/notifications.go b/internal/worker/notifications.go index cd974f9..f3cc820 100644 --- a/internal/worker/notifications.go +++ b/internal/worker/notifications.go @@ -95,9 +95,7 @@ func (nw *notificationsWorker) Start() error { nw.logger.Info("starting up notifications worker", zap.Int("consumers", nw.consumers)) - prefetchLimit := int64(nw.consumers * 20) - - if err := queue.StartConsuming(prefetchLimit, pollDuration); err != nil { + if err := queue.StartConsuming(int64(nw.consumers/4), pollDuration); err != nil { return err }