|
@@ -12,7 +12,6 @@ import ( |
|
@@ -12,7 +12,6 @@ import ( |
12
|
"gitlab.fjmaimaimai.com/mmm-go/gocomm/pkg/websocket"
|
12
|
"gitlab.fjmaimaimai.com/mmm-go/gocomm/pkg/websocket"
|
13
|
"opp/internal/utils"
|
13
|
"opp/internal/utils"
|
14
|
_ "opp/routers"
|
14
|
_ "opp/routers"
|
15
|
- "opp/services/im"
|
|
|
16
|
"time"
|
15
|
"time"
|
17
|
)
|
16
|
)
|
18
|
|
17
|
|
|
@@ -30,6 +29,7 @@ func init() { |
|
@@ -30,6 +29,7 @@ func init() { |
30
|
//})
|
29
|
//})
|
31
|
redisSource := fmt.Sprintf("%v:%v", beego.AppConfig.String("redis_add"), beego.AppConfig.String("redis_add_port"))
|
30
|
redisSource := fmt.Sprintf("%v:%v", beego.AppConfig.String("redis_add"), beego.AppConfig.String("redis_add_port"))
|
32
|
err := redis.InitWithDb(100, redisSource, beego.AppConfig.String("redis_auth"), "0")
|
31
|
err := redis.InitWithDb(100, redisSource, beego.AppConfig.String("redis_auth"), "0")
|
|
|
32
|
+ log.Info(fmt.Sprintf("init redis:%v", redisSource))
|
33
|
if err != nil {
|
33
|
if err != nil {
|
34
|
log.Fatal("connect to redis error address:", beego.AppConfig.String("redis_add_port"), beego.AppConfig.String("redis_auth"), err)
|
34
|
log.Fatal("connect to redis error address:", beego.AppConfig.String("redis_add_port"), beego.AppConfig.String("redis_auth"), err)
|
35
|
//panic(err)
|
35
|
//panic(err)
|
|
@@ -41,6 +41,7 @@ func init() { |
|
@@ -41,6 +41,7 @@ func init() { |
41
|
beego.AppConfig.String("mysql_port"),
|
41
|
beego.AppConfig.String("mysql_port"),
|
42
|
beego.AppConfig.String("mysql_db_name"),
|
42
|
beego.AppConfig.String("mysql_db_name"),
|
43
|
)
|
43
|
)
|
|
|
44
|
+ log.Info(fmt.Sprintf("init mysql:%v", dataSource))
|
44
|
orm.NewBeeormEngine(config.Mysql{
|
45
|
orm.NewBeeormEngine(config.Mysql{
|
45
|
//AliasName: "default",
|
46
|
//AliasName: "default",
|
46
|
DataSource: dataSource,
|
47
|
DataSource: dataSource,
|
|
@@ -55,7 +56,7 @@ func init() { |
|
@@ -55,7 +56,7 @@ func init() { |
55
|
//Password:"ibfduqhfmgypbffe", //授权码
|
56
|
//Password:"ibfduqhfmgypbffe", //授权码
|
56
|
//IsUseSsl:true,
|
57
|
//IsUseSsl:true,
|
57
|
})
|
58
|
})
|
58
|
- im.InitImClient(beego.AppConfig.String("net_im_base_url"), beego.AppConfig.String("net_im_app_key"), beego.AppConfig.String("net_im_app_secret"))
|
59
|
+ //im.InitImClient(beego.AppConfig.String("net_im_base_url"), beego.AppConfig.String("net_im_app_key"), beego.AppConfig.String("net_im_app_secret"))
|
59
|
websocket.InitWebsocketConnmgrs(10)
|
60
|
websocket.InitWebsocketConnmgrs(10)
|
60
|
}
|
61
|
}
|
61
|
|
62
|
|