Browse Source

change mongo and redis config

animeic 2 years ago
parent
commit
2010d27541
3 changed files with 3 additions and 4 deletions
  1. 1 2
      3dshow/app.yaml
  2. 1 1
      3dshow/db/db.go
  3. 1 1
      3dshow/db/redis.go

+ 1 - 2
3dshow/app.yaml

@@ -20,7 +20,6 @@ debug:
   UserRole: string
 
 nats:
-  #url: nats://124.71.139.24:14300
-  url: nats://127.0.0.1:14301
+  url: nats://124.71.139.24:14301
   maxReconnect: 1000
   reconnDelaySecond: 5

+ 1 - 1
3dshow/db/db.go

@@ -35,7 +35,7 @@ func (db *MongoDB) GetOrCreateDatabase(name string) *mongo.Database {
 }
 
 func NewMongoDB(bus *comm.NatsBus) *MongoDB {
-	inst, err := bus.NewMongoDBFromConfigDev("box-mongo")
+	inst, err := bus.NewMongoDBFromConfig("3dshow-mongo")
 	if err != nil {
 		panic(err)
 	}

+ 1 - 1
3dshow/db/redis.go

@@ -6,7 +6,7 @@ import (
 )
 
 func NewRedisClient(bus *comm.NatsBus) *redis.Client {
-	client, err := bus.NewRedisFromConfigDev("box-redis")
+	client, err := bus.NewRedisFromConfig("3dshow-redis")
 	if err != nil {
 		return nil
 	}