修改DB配置
This commit is contained in:
parent
e51aecbba8
commit
db575f5bc0
@ -29,6 +29,7 @@ var Server struct {
|
||||
RedisAddr string
|
||||
RedisPort string
|
||||
RedisPwd string
|
||||
RedisDb int
|
||||
|
||||
GameName string
|
||||
ServerType string
|
||||
|
||||
@ -17,7 +17,7 @@ func InitRedis() {
|
||||
rdb := redis.NewClient(&redis.Options{
|
||||
Addr: conf.Server.RedisAddr + ":" + conf.Server.RedisPort,
|
||||
Password: conf.Server.RedisPwd, // no password set
|
||||
DB: 0,
|
||||
DB: conf.Server.RedisDb,
|
||||
})
|
||||
|
||||
_, err := rdb.Ping(ctx).Result()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user