1
This commit is contained in:
parent
37a99c4226
commit
3163678bc0
3
app.go
3
app.go
@ -109,6 +109,8 @@ func (this *app) init(userApp UserApp) {
|
||||
_jsStyleDb.init(JS_STYLE_DB)
|
||||
_httpCliMgr = new(httpCliMgr)
|
||||
_httpCliMgr.init()
|
||||
_msgQueue = new(msgQueue)
|
||||
_msgQueue.init()
|
||||
{
|
||||
tmpNodeId, tmpInstanceId := parseArgs()
|
||||
this.nodeId = int32(tmpNodeId)
|
||||
@ -163,6 +165,7 @@ func (this *app) init(userApp UserApp) {
|
||||
|
||||
func (this *app) unInit() {
|
||||
this.chGoLoopTimerExit <- 1
|
||||
_msgQueue.unInit()
|
||||
_httpCliMgr.unInit()
|
||||
_goStyleDb.unInit()
|
||||
_jsStyleDb.unInit()
|
||||
|
@ -8,6 +8,7 @@ var _httpCliMgr *httpCliMgr
|
||||
var _dbFilter *dbFilter
|
||||
var _goStyleDb *goDbPool
|
||||
var _jsStyleDb *dbPool
|
||||
var _msgQueue *msgQueue
|
||||
|
||||
func GetApp() App {
|
||||
return _app
|
||||
@ -41,6 +42,10 @@ func GetJsStyleDb() *dbPool {
|
||||
return _jsStyleDb
|
||||
}
|
||||
|
||||
func GetMsgQueue() *msgQueue {
|
||||
return _msgQueue
|
||||
}
|
||||
|
||||
func Run(userApp UserApp) {
|
||||
_app = new(app)
|
||||
_app.init(userApp)
|
||||
|
Loading…
x
Reference in New Issue
Block a user