2
0
mirror of https://github.com/hibiken/asynq.git synced 2025-01-13 08:23:37 +08:00

Merge branch 'hibiken:master' into master

This commit is contained in:
mindon 2022-12-29 15:15:42 +08:00 committed by GitHub
commit d121033c37
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -351,7 +351,7 @@ func initConfig() {
// createRDB creates a RDB instance using flag values and returns it.
func createRDB() *rdb.RDB {
var c redis.UniversalClient
if useRedisCluster {
if viper.GetBool("cluster") {
addrs := strings.Split(viper.GetString("cluster_addrs"), ",")
c = redis.NewClusterClient(&redis.ClusterOptions{
Addrs: addrs,
@ -375,7 +375,7 @@ func createInspector() *asynq.Inspector {
}
func getRedisConnOpt() asynq.RedisConnOpt {
if useRedisCluster {
if viper.GetBool("cluster") {
addrs := strings.Split(viper.GetString("cluster_addrs"), ",")
return asynq.RedisClusterClientOpt{
Addrs: addrs,