mirror of
https://github.com/hibiken/asynq.git
synced 2025-09-19 13:21:58 +08:00
Add DB field to RedisOpt to specify redis db index
This commit is contained in:
@@ -14,7 +14,11 @@ type Client struct {
|
||||
|
||||
// NewClient creates and returns a new client.
|
||||
func NewClient(opt *RedisOpt) *Client {
|
||||
client := redis.NewClient(&redis.Options{Addr: opt.Addr, Password: opt.Password})
|
||||
client := redis.NewClient(&redis.Options{
|
||||
Addr: opt.Addr,
|
||||
Password: opt.Password,
|
||||
DB: opt.DB,
|
||||
})
|
||||
return &Client{rdb: newRDB(client)}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user