mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-24 12:47:43 +00:00
make pool sizes customized
This commit is contained in:
parent
447a21ba60
commit
e241f67888
1 changed files with 3 additions and 5 deletions
|
@ -52,21 +52,19 @@ func WorkerCmd(ctx context.Context) *cobra.Command {
|
|||
|
||||
tracer := otel.Tracer(tag)
|
||||
|
||||
poolSize := consumers / 8
|
||||
|
||||
db, err := cmdutil.NewDatabasePool(ctx, poolSize)
|
||||
db, err := cmdutil.NewDatabasePool(ctx, consumers/16)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer db.Close()
|
||||
|
||||
redis, err := cmdutil.NewRedisLocksClient(ctx, poolSize)
|
||||
redis, err := cmdutil.NewRedisLocksClient(ctx, consumers/8)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer redis.Close()
|
||||
|
||||
qredis, err := cmdutil.NewRedisQueueClient(ctx, poolSize)
|
||||
qredis, err := cmdutil.NewRedisQueueClient(ctx, consumers/16)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue