Commit 4dd0428d by 孙龙

up

parent 5b340abf
Showing with 3 additions and 4 deletions
package dao package dao
import ( import (
"fmt"
"time"
"sync" "sync"
"time"
"xorm.io/xorm" "xorm.io/xorm"
redisPool "github.com/ichunt2019/go-redis-pool"
"github.com/go-redis/redis/v7" "github.com/go-redis/redis/v7"
_ "github.com/go-sql-driver/mysql" _ "github.com/go-sql-driver/mysql"
"github.com/ichunt2019/cfg/lib" "github.com/ichunt2019/cfg/lib"
redisPool "github.com/ichunt2019/go-redis-pool"
"ichunt_golang/app/common/config" "ichunt_golang/app/common/config"
) )
...@@ -84,7 +83,7 @@ func mysqlSetup(d *dao) *dao { ...@@ -84,7 +83,7 @@ func mysqlSetup(d *dao) *dao {
func redisSetup(d *dao) *dao { func redisSetup(d *dao) *dao {
var err error var err error
redisGroupList := config.BuildRedisGroupConfigs() redisGroupList := config.BuildRedisGroupConfigs()
fmt.Println(redisGroupList) //fmt.Println(redisGroupList)
for redisServerName, redisInfo := range redisGroupList { for redisServerName, redisInfo := range redisGroupList {
d.redisGroup[redisServerName], err = redisPool.NewHA(&redisPool.HAConfig{ d.redisGroup[redisServerName], err = redisPool.NewHA(&redisPool.HAConfig{
Master: redisInfo.MasterHost, Master: redisInfo.MasterHost,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment