- elm use routine pool.
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"git.rosy.net.cn/baseapi/platformapi/mtpsapi"
|
||||
"git.rosy.net.cn/baseapi/platformapi/weixinapi"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/baseapi/utils/routinepool"
|
||||
elmmodels "git.rosy.net.cn/jx-callback/business/elm/models"
|
||||
"git.rosy.net.cn/jx-callback/business/freshfood"
|
||||
jdmodels "git.rosy.net.cn/jx-callback/business/jd/models"
|
||||
@@ -22,6 +23,7 @@ const (
|
||||
)
|
||||
|
||||
var (
|
||||
RoutinePool *routinepool.Pool
|
||||
FreshFoodAPI *freshfood.FreshFoodAPI
|
||||
|
||||
Jdapi *jdapi.API
|
||||
@@ -33,6 +35,8 @@ var (
|
||||
|
||||
func init() {
|
||||
initDB()
|
||||
routinePoolSize := beego.AppConfig.DefaultInt("routinePoolSize", 0)
|
||||
RoutinePool = routinepool.New(routinePoolSize, routinePoolSize)
|
||||
FreshFoodAPI = freshfood.NewFreshFoodAPI(beego.AppConfig.String("freshFoodServerURL"))
|
||||
Jdapi = jdapi.New(beego.AppConfig.String("jdToken"), beego.AppConfig.String("jdAppKey"), beego.AppConfig.String("jdSecret"))
|
||||
initElm()
|
||||
|
||||
Reference in New Issue
Block a user