diff --git a/game-server/app.ts b/game-server/app.ts index 57e5e22f9..81f2ae4f2 100644 --- a/game-server/app.ts +++ b/game-server/app.ts @@ -131,6 +131,12 @@ app.configure(ALL_ENVS, 'systimer', function () { }); }); +app.configure(ALL_ENVS, 'chat', function() { + app.event.on('start_all', () => { + getTire(); + }); +}) + function errorHandler(err: Error, msg: any, resp: any, session: FrontendOrBackendSession, cb: HandlerCallback) { const errCode = genCode(10); diff --git a/game-server/app/services/timeTaskService.ts b/game-server/app/services/timeTaskService.ts index c6e8551de..08f88a465 100644 --- a/game-server/app/services/timeTaskService.ts +++ b/game-server/app/services/timeTaskService.ts @@ -24,6 +24,7 @@ import moment = require('moment'); import { CounterModel } from '../db/Counter'; import { reportOneOnline } from './authenticateService'; import { PVP } from '../pubUtils/dicParam'; +import { fetch37Words } from './sdkService'; const PER_SECOND = 1 * 1000; const PER_DAY = 24 * 60 * 60; @@ -55,6 +56,9 @@ export async function init() { // 每5分钟汇报在线玩家在线情况 scheduleJob('reportOnline', '0 0/5 * * * *', reportOnlineSchedule); + // 每天拉取37词库 + scheduleJob('fetchWord', '0 0 4 * * ?', fetch37Words); + // 军团活动排行榜 guildActivitySchedule();