sdk:屏蔽词库加载处修改
This commit is contained in:
+6
-1
@@ -27,7 +27,7 @@ import _pinus = require('pinus');
|
||||
import { updateTeamStatus } from './app/services/comBattleService';
|
||||
import { resResult, genCode } from './app/pubUtils/util';
|
||||
import { errlogger, infologger } from './app/util/logger';
|
||||
import { connectThinkingData } from './app/services/sdkService';
|
||||
import { connectThinkingData, getTire } from './app/services/sdkService';
|
||||
|
||||
const filePath = (_pinus as any).FILEPATH;
|
||||
filePath.MASTER = '/config/master';
|
||||
@@ -131,6 +131,11 @@ app.configure(ALL_ENVS, 'systimer', function () {
|
||||
});
|
||||
});
|
||||
|
||||
app.configure(ALL_ENVS, 'chat', function() {
|
||||
app.afterStart(() => {
|
||||
getTire();
|
||||
})
|
||||
});
|
||||
|
||||
function errorHandler(err: Error, msg: any, resp: any,
|
||||
session: FrontendOrBackendSession, cb: HandlerCallback) {
|
||||
|
||||
@@ -35,7 +35,6 @@ export class ChatRemote {
|
||||
constructor(private app: Application) {
|
||||
this.app = app;
|
||||
this.channelService = app.get('channelService');
|
||||
getTire();
|
||||
}
|
||||
|
||||
private channelService: ChannelService;
|
||||
|
||||
@@ -208,6 +208,7 @@ export async function fetch37Words() {
|
||||
}
|
||||
|
||||
export async function getTire() {
|
||||
console.log('**********getTire')
|
||||
let trie = pinus.app.get('tire');
|
||||
if(!trie) {
|
||||
let blockWords = readWordTxt(FILENAME.FILTER_WORDS);
|
||||
|
||||
Reference in New Issue
Block a user