From e241f678886851466e93deadb9b885ffe3824481 Mon Sep 17 00:00:00 2001 From: Andre Medeiros Date: Sat, 5 Nov 2022 20:35:09 -0400 Subject: [PATCH] make pool sizes customized --- internal/cmd/worker.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/internal/cmd/worker.go b/internal/cmd/worker.go index f6d9381..6fd3182 100644 --- a/internal/cmd/worker.go +++ b/internal/cmd/worker.go @@ -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 }