diff --git a/internal/worker/notifications.go b/internal/worker/notifications.go index ead836f..cd974f9 100644 --- a/internal/worker/notifications.go +++ b/internal/worker/notifications.go @@ -95,7 +95,7 @@ func (nw *notificationsWorker) Start() error { nw.logger.Info("starting up notifications worker", zap.Int("consumers", nw.consumers)) - prefetchLimit := int64(nw.consumers * 4) + prefetchLimit := int64(nw.consumers * 20) if err := queue.StartConsuming(prefetchLimit, pollDuration); err != nil { return err diff --git a/internal/worker/worker.go b/internal/worker/worker.go index fb01eff..b514823 100644 --- a/internal/worker/worker.go +++ b/internal/worker/worker.go @@ -11,7 +11,7 @@ import ( "go.uber.org/zap" ) -const pollDuration = 50 * time.Millisecond +const pollDuration = 100 * time.Millisecond type NewWorkerFn func(context.Context, *zap.Logger, *statsd.Client, *pgxpool.Pool, *redis.Client, rmq.Connection, int) Worker type Worker interface {