queueConfig := config.GetConfig().Queue
address := net.JoinHostPort(queueConfig.Redis.Host, queueConfig.Redis.Port)
provider.redis = redis.NewClient(&redis.Options{
Addr: address,
Password: queueConfig.Redis.Password,
})
client := provider.redis
for _, taskName := range taskNames {
queueName := getQueueByTask(taskName)
logger.
Get(ctx).
WithField("queue_name_new", queueName).
Info("QUEUE_NAME_LOGGER")
queueTaskMap[queueName] = taskName
cmd := pipeline.LLen(queueName)
}
cmds, err := pipeline.Exec()
The above code when run does not give any results in cmds, the slice is empty. I tried a bunch of things:
- Tried accessing the values from the cmd object returned by Llen -> In this instance, the value returned is 0, since Exec() does not populate the values.
- Tried using Pipelined as well, didn't work.
Context: I am using redis-labs running this code on Kubernetes. Normal redis calls work.