mirror of
https://github.com/hibiken/asynq.git
synced 2024-12-25 07:12:17 +08:00
fix redis sentinel url parse
This commit is contained in:
parent
c70ff6a335
commit
c08f142b56
2
asynq.go
2
asynq.go
@ -519,7 +519,7 @@ func parseRedisSentinelURI(u *url.URL) (RedisConnOpt, error) {
|
||||
if v, ok := u.User.Password(); ok {
|
||||
password = v
|
||||
}
|
||||
return RedisFailoverClientOpt{MasterName: master, SentinelAddrs: addrs, Password: password}, nil
|
||||
return RedisFailoverClientOpt{MasterName: master, SentinelAddrs: addrs, SentinelPassword: password}, nil
|
||||
}
|
||||
|
||||
// ResultWriter is a client interface to write result data for a task.
|
||||
|
@ -143,9 +143,9 @@ func TestParseRedisURI(t *testing.T) {
|
||||
{
|
||||
"redis-sentinel://:mypassword@localhost:5000,localhost:5001,localhost:5002?master=mymaster",
|
||||
RedisFailoverClientOpt{
|
||||
MasterName: "mymaster",
|
||||
SentinelAddrs: []string{"localhost:5000", "localhost:5001", "localhost:5002"},
|
||||
Password: "mypassword",
|
||||
MasterName: "mymaster",
|
||||
SentinelAddrs: []string{"localhost:5000", "localhost:5001", "localhost:5002"},
|
||||
SentinelPassword: "mypassword",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user