2
0
mirror of https://github.com/hibiken/asynq.git synced 2025-10-24 22:46:11 +08:00

Add redis-cluster support in asynq CLI

This commit is contained in:
Ken Hibino
2020-08-31 06:46:56 -07:00
parent dab8295883
commit a9c31553b8
7 changed files with 81 additions and 119 deletions

View File

@@ -12,10 +12,8 @@ import (
"text/tabwriter"
"time"
"github.com/go-redis/redis/v7"
"github.com/hibiken/asynq/internal/rdb"
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
// statsCmd represents the stats command
@@ -64,12 +62,7 @@ type AggregateStats struct {
}
func stats(cmd *cobra.Command, args []string) {
c := redis.NewClient(&redis.Options{
Addr: viper.GetString("uri"),
DB: viper.GetInt("db"),
Password: viper.GetString("password"),
})
r := rdb.NewRDB(c)
r := createRDB()
queues, err := r.AllQueues()
if err != nil {