change prefetch limit for notifications worker

This commit is contained in:
Andre Medeiros 2022-11-01 19:08:10 -04:00
parent 6cf7c54c86
commit c7a57121b6
2 changed files with 2 additions and 2 deletions

View file

@ -95,7 +95,7 @@ func (nw *notificationsWorker) Start() error {
nw.logger.Info("starting up notifications worker", zap.Int("consumers", nw.consumers)) 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 { if err := queue.StartConsuming(prefetchLimit, pollDuration); err != nil {
return err return err

View file

@ -11,7 +11,7 @@ import (
"go.uber.org/zap" "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 NewWorkerFn func(context.Context, *zap.Logger, *statsd.Client, *pgxpool.Pool, *redis.Client, rmq.Connection, int) Worker
type Worker interface { type Worker interface {