mirror of
https://github.com/hibiken/asynqmon.git
synced 2025-01-19 03:05:53 +08:00
Add and fix comments
This commit is contained in:
parent
b7c2ebeff3
commit
b3b8c2d13d
@ -20,8 +20,7 @@ import (
|
|||||||
"github.com/rs/cors"
|
"github.com/rs/cors"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Config holds configurations for the running program
|
// Config holds configurations for the program provided via the command line.
|
||||||
// provided by the user via command line.
|
|
||||||
type Config struct {
|
type Config struct {
|
||||||
// Server port
|
// Server port
|
||||||
Port int
|
Port int
|
||||||
@ -126,7 +125,9 @@ func makeRedisConnOpt(cfg *Config) (asynq.RedisConnOpt, error) {
|
|||||||
connOpt.DB = cfg.RedisDB
|
connOpt.DB = cfg.RedisDB
|
||||||
connOpt.Password = cfg.RedisPassword
|
connOpt.Password = cfg.RedisPassword
|
||||||
}
|
}
|
||||||
connOpt.TLSConfig = makeTLSConfig(cfg)
|
if connOpt.TLSConfig == nil {
|
||||||
|
connOpt.TLSConfig = makeTLSConfig(cfg)
|
||||||
|
}
|
||||||
return connOpt, nil
|
return connOpt, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ func TestMakeRedisConnOpt(t *testing.T) {
|
|||||||
MasterName: "mymaster",
|
MasterName: "mymaster",
|
||||||
SentinelAddrs: []string{
|
SentinelAddrs: []string{
|
||||||
"localhost:5000", "localhost:5001", "localhost:5002"},
|
"localhost:5000", "localhost:5001", "localhost:5002"},
|
||||||
Password: "secretpassword",
|
Password: "secretpassword", // FIXME: Shouldn't this be SentinelPassword instead?
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user