make pool sizes customized

This commit is contained in:
Andre Medeiros 2022-11-05 20:35:09 -04:00
parent 447a21ba60
commit e241f67888

View file

@ -52,21 +52,19 @@ func WorkerCmd(ctx context.Context) *cobra.Command {
tracer := otel.Tracer(tag) tracer := otel.Tracer(tag)
poolSize := consumers / 8 db, err := cmdutil.NewDatabasePool(ctx, consumers/16)
db, err := cmdutil.NewDatabasePool(ctx, poolSize)
if err != nil { if err != nil {
return err return err
} }
defer db.Close() defer db.Close()
redis, err := cmdutil.NewRedisLocksClient(ctx, poolSize) redis, err := cmdutil.NewRedisLocksClient(ctx, consumers/8)
if err != nil { if err != nil {
return err return err
} }
defer redis.Close() defer redis.Close()
qredis, err := cmdutil.NewRedisQueueClient(ctx, poolSize) qredis, err := cmdutil.NewRedisQueueClient(ctx, consumers/16)
if err != nil { if err != nil {
return err return err
} }