mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-25 13:17:42 +00:00
test: less prefetch more workers at the same time
This commit is contained in:
parent
a00e4405c7
commit
b26140f190
3 changed files with 3 additions and 3 deletions
|
@ -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")
|
cmd.Flags().StringVar(&queueID, "queue", "", "The queue to work on")
|
||||||
|
|
||||||
return cmd
|
return cmd
|
||||||
|
|
|
@ -93,7 +93,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 * 10)
|
prefetchLimit := int64(nw.consumers * 2)
|
||||||
|
|
||||||
if err := queue.StartConsuming(prefetchLimit, pollDuration); err != nil {
|
if err := queue.StartConsuming(prefetchLimit, pollDuration); err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
|
@ -91,7 +91,7 @@ services:
|
||||||
maxInstances: 20
|
maxInstances: 20
|
||||||
targetCPUPercent: 60
|
targetCPUPercent: 60
|
||||||
buildCommand: go install github.com/bugsnag/panic-monitor@latest && go build ./cmd/apollo
|
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
|
# Stuck Notifications Checker
|
||||||
- type: worker
|
- type: worker
|
||||||
|
|
Loading…
Reference in a new issue