test: less prefetch more workers at the same time

This commit is contained in:
Andre Medeiros 2022-07-13 15:08:21 -04:00
parent a00e4405c7
commit b26140f190
3 changed files with 3 additions and 3 deletions

View file

@ -83,7 +83,7 @@ func WorkerCmd(ctx context.Context) *cobra.Command {
},
}
cmd.Flags().IntVar(&multiplier, "multiplier", 12, "The multiplier (by CPUs) to run")
cmd.Flags().IntVar(&multiplier, "multiplier", 4, "The multiplier (by CPUs) to run")
cmd.Flags().StringVar(&queueID, "queue", "", "The queue to work on")
return cmd

View file

@ -93,7 +93,7 @@ func (nw *notificationsWorker) Start() error {
nw.logger.Info("starting up notifications worker", zap.Int("consumers", nw.consumers))
prefetchLimit := int64(nw.consumers * 10)
prefetchLimit := int64(nw.consumers * 2)
if err := queue.StartConsuming(prefetchLimit, pollDuration); err != nil {
return err

View file

@ -91,7 +91,7 @@ services:
maxInstances: 20
targetCPUPercent: 60
buildCommand: go install github.com/bugsnag/panic-monitor@latest && go build ./cmd/apollo
startCommand: panic-monitor ./apollo worker --queue notifications --multiplier 64
startCommand: panic-monitor ./apollo worker --queue notifications
# Stuck Notifications Checker
- type: worker