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