mirror of
https://github.com/hibiken/asynq.git
synced 2025-10-23 10:16:12 +08:00
[ci skip] Allow config file to set default values for flags
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
"github.com/go-redis/redis/v7"
|
||||
"github.com/hibiken/asynq/internal/rdb"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
// enqCmd represents the enq command
|
||||
@@ -52,8 +53,9 @@ func enq(cmd *cobra.Command, args []string) {
|
||||
os.Exit(1)
|
||||
}
|
||||
r := rdb.NewRDB(redis.NewClient(&redis.Options{
|
||||
Addr: uri,
|
||||
DB: db,
|
||||
Addr: viper.GetString("uri"),
|
||||
DB: viper.GetInt("db"),
|
||||
Password: viper.GetString("password"),
|
||||
}))
|
||||
switch qtype {
|
||||
case "s":
|
||||
|
Reference in New Issue
Block a user