get a separate redis connection for the queue itself

This commit is contained in:
Andre Medeiros 2022-10-31 22:41:41 -04:00
parent a441d2723e
commit 61dc3b558f

View file

@ -56,13 +56,19 @@ func WorkerCmd(ctx context.Context) *cobra.Command {
} }
defer db.Close() defer db.Close()
qredis, err := cmdutil.NewRedisClient(ctx, 4)
if err != nil {
return err
}
defer qredis.Close()
redis, err := cmdutil.NewRedisClient(ctx, consumers) redis, err := cmdutil.NewRedisClient(ctx, consumers)
if err != nil { if err != nil {
return err return err
} }
defer redis.Close() defer redis.Close()
queue, err := cmdutil.NewQueueClient(logger, redis, "worker") queue, err := cmdutil.NewQueueClient(logger, qredis, "worker")
if err != nil { if err != nil {
return err return err
} }