- elm use routine pool.

This commit is contained in:
gazebo
2018-06-28 12:38:45 +08:00
parent b756990cee
commit 718c54b507
3 changed files with 19 additions and 7 deletions

View File

@@ -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()