Explorar el Código

修改redis配置

Rick.Lan hace 2 semanas
padre
commit
354d42a697
Se han modificado 3 ficheros con 10 adiciones y 4 borrados
  1. 2 2
      conf/app.conf
  2. 2 2
      service/redis.go
  3. 6 0
      start.sh

+ 2 - 2
conf/app.conf Ver fichero

@@ -124,7 +124,7 @@ writepatientname = sgj_cdm
124 124
 redishost = kuyicloud.redis.rds.aliyuncs.com
125 125
 redisport = 6379
126 126
 redispasswrod = 1Q2W3e4r!@#$
127
-redisdb = 1
127
+redisdb = 4
128 128
 
129 129
 EnableRender= false
130 130
 niprocart =  63
@@ -232,7 +232,7 @@ writesgjpatientmysqlname = sgj_patient
232 232
 redishost = kuyi6666.redis.rds.aliyuncs.com
233 233
 redisport = 6379
234 234
 redispasswrod = TZtBW098WId3i27clkpj3q8dnUaVFP
235
-redisdb = 7
235
+redisdb = 4
236 236
 
237 237
 niprocart =  83
238 238
 jms = 80

+ 2 - 2
service/redis.go Ver fichero

@@ -11,8 +11,8 @@ func RedisClient() *redis.Client {
11 11
 	address := fmt.Sprintf("%s:%s", beego.AppConfig.String("redishost"), beego.AppConfig.String("redisport"))
12 12
 	client := redis.NewClient(&redis.Options{
13 13
 		Addr:     address,
14
-		Password: beego.AppConfig.String("redispasswrod"), // no password set
15
-		DB:       0,                                       // use default DB
14
+		Password: beego.AppConfig.String("redispasswrod"),  // no password set
15
+		DB:       beego.AppConfig.DefaultInt("redisdb", 4), // use default DB
16 16
 	})
17 17
 	pong, err := client.Ping().Result()
18 18
 	fmt.Println(pong, err)

+ 6 - 0
start.sh Ver fichero

@@ -0,0 +1,6 @@
1
+#!/bin/sh
2
+
3
+nohup ./Xcx_New >>log.txt &
4
+echo "starting..."
5
+sleep 1
6
+echo "started"