From 3163678bc02e1ffa3a230681518d2adedaea60e6 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Wed, 6 Nov 2024 15:29:38 +0800 Subject: [PATCH] 1 --- app.go | 3 +++ export.go | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/app.go b/app.go index e544278..9fc2a02 100644 --- a/app.go +++ b/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() diff --git a/export.go b/export.go index be74476..537a619 100644 --- a/export.go +++ b/export.go @@ -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)