mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-22 03:37:43 +00:00
change prefetch limit for notifications worker
This commit is contained in:
parent
6cf7c54c86
commit
c7a57121b6
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue