后台:内存快照
This commit is contained in:
@@ -8,6 +8,7 @@ import { ActivityInRemote } from '../../../domain/activityField/activityField';
|
||||
import { errlogger } from '../../../util/logger';
|
||||
import { ActivityGroupModel } from '../../../db/ActivityGroup';
|
||||
import { deleteActivities, loadActivities, saveActivitiesToGroup, updateActivities, _getActivityById, _getActivitiesByType, _getActivities, _getActivitiesByServerId } from '../../../services/activity/activityRemoteService';
|
||||
import { saveActivityMemory } from '../../../services/log/memoryLogService';
|
||||
|
||||
export default function (app: Application) {
|
||||
new HandlerService(app, {});
|
||||
@@ -139,4 +140,12 @@ export class ActivityRemote {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
|
||||
public saveActivityMemory() {
|
||||
try {
|
||||
return saveActivityMemory();
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@ import { Application, ChannelService, FrontendSession, RemoterClass, HandlerServ
|
||||
import { PVPConfigModel, PVPConfigType } from '../../../db/SystemConfig';
|
||||
import { reloadResources } from '../../../pubUtils/data';
|
||||
import { getServerMainten, setServerMainten, stopServerMainten } from '../../../services/gmService';
|
||||
import { savePvpSeasonMemory } from '../../../services/log/memoryLogService';
|
||||
import { taflush } from '../../../services/sdkService';
|
||||
import { errlogger } from '../../../util/logger';
|
||||
|
||||
@@ -140,4 +141,12 @@ export class BattleRemote {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
|
||||
public savePvpSeasonMemory() {
|
||||
try {
|
||||
return savePvpSeasonMemory();
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@ import { STATUS } from '../../../consts';
|
||||
import { handleComBtlProgress, _addToSearchingTeams } from '../../../services/comBattleService';
|
||||
import { MemComBtlTeam } from '../../../domain/battleField/ComBattleTeamField';
|
||||
import { errlogger } from '../../../util/logger';
|
||||
import { saveComBattleMemory } from '../../../services/log/memoryLogService';
|
||||
|
||||
export default function (app: Application) {
|
||||
new HandlerService(app, {});
|
||||
@@ -44,4 +45,11 @@ export class ComBattleRemote {
|
||||
}
|
||||
}
|
||||
|
||||
public saveComBattleMemory() {
|
||||
try {
|
||||
return saveComBattleMemory();
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -10,6 +10,7 @@ import { getServerMainten, setServerMainten, stopServerMainten } from '../../../
|
||||
import { taflush } from '../../../services/sdkService';
|
||||
import { errlogger } from '../../../util/logger';
|
||||
import { setWeek } from '../../../pubUtils/timeUtil';
|
||||
import { savePvpSeasonMemory } from '../../../services/log/memoryLogService';
|
||||
export default function (app: Application) {
|
||||
new HandlerService(app, {});
|
||||
return new ConnectorRemote(app);
|
||||
@@ -171,4 +172,12 @@ export class ConnectorRemote {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
|
||||
public savePvpSeasonMemory() {
|
||||
try {
|
||||
return savePvpSeasonMemory();
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ import { Application, BackendSession, pinus } from 'pinus';
|
||||
import { getRandSingleEelm, resResult } from '../../../pubUtils/util';
|
||||
import { STATUS } from '../../../consts/statusCode';
|
||||
import { GMMailModel, GMMailType } from '../../../db/GMMail';
|
||||
import { ACTIVITY_TYPE, GM_MAIL_STATUS, GM_MAIL_TYPE, MAIL_TIME_TYPE, PUSH_ROUTE, SURVEY_SELECT } from '../../../consts';
|
||||
import { ACTIVITY_TYPE, GM_MAIL_STATUS, GM_MAIL_TYPE, MAIL_TIME_TYPE, MEMORY_LOG_TYPE, PUSH_ROUTE, SURVEY_SELECT } from '../../../consts';
|
||||
import { ActivityModel } from '../../../db/Activity';
|
||||
import { ActivityGroupModel } from '../../../db/ActivityGroup';
|
||||
import { ActivityGroupTypeModel } from '../../../db/ActivityGroupType';
|
||||
@@ -16,6 +16,8 @@ import { SurveyModel, SurveyUpdate } from '../../../db/Survery';
|
||||
import { getSurvey } from '../../../services/gmService';
|
||||
import { sendMessageToAllWithSuc } from '../../../services/pushService';
|
||||
import { sendMailByContent, sendMailsByGmMail } from '../../../services/mailService';
|
||||
import { saveMemory } from '../../../services/log/memoryLogService';
|
||||
|
||||
let timer: NodeJS.Timer;
|
||||
export default function (app: Application) {
|
||||
return new GmHandler(app);
|
||||
@@ -276,4 +278,10 @@ export class GmHandler {
|
||||
|
||||
return resResult(STATUS.SUCCESS);
|
||||
}
|
||||
|
||||
async saveMemoryLog(msg: { memoryLogType: MEMORY_LOG_TYPE }, session: BackendSession) {
|
||||
const { memoryLogType } = msg;
|
||||
await saveMemory(memoryLogType);
|
||||
return resResult(STATUS.SUCCESS);
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,7 @@ import { addItems } from '../../../services/role/rewardService';
|
||||
import { RewardInter } from '../../../pubUtils/interface';
|
||||
import { gameData, getExpByLv, getHeroExpByLv, getHeroLvByExp, getLvByExp } from '../../../pubUtils/data';
|
||||
import { RoleModel, RoleType, WarStar } from '../../../db/Role';
|
||||
import { BLOCK_TYPE, DEFAULT_HEROES, GUILD_AUTH, GUILD_DISMISS_WAY, GUILD_JOB, GUILD_MASTER_CHANGE_WAY, GUILD_STATUS, GUILD_STRUCTURE, HERO_SYSTEM_TYPE, ITEM_CHANGE_REASON, MAIL_TYPE, PUSH_ROUTE, REDIS_KEY, TA_EVENT, WAR_TYPE } from '../../../consts';
|
||||
import { BLOCK_TYPE, DEFAULT_HEROES, GUILD_AUTH, GUILD_DISMISS_WAY, GUILD_JOB, GUILD_MASTER_CHANGE_WAY, GUILD_STATUS, GUILD_STRUCTURE, HERO_SYSTEM_TYPE, ITEM_CHANGE_REASON, MAIL_TYPE, MEMORY_LOG_TYPE, PUSH_ROUTE, REDIS_KEY, TA_EVENT, WAR_TYPE } from '../../../consts';
|
||||
import { GuildFormParam, SetHeroParam } from '../../../domain/backEndField/params';
|
||||
import { GuildModel, GuildUpdateParam } from '../../../db/Guild';
|
||||
import { Rank } from '../../../services/rankService';
|
||||
|
||||
@@ -5,6 +5,7 @@ import { setWeek } from '../../../pubUtils/timeUtil';
|
||||
import { sendUngotDividend } from '../../../services/auctionService';
|
||||
import { errlogger } from '../../../util/logger';
|
||||
import { GUILD_ACTIVITY_TYPE } from '../../../consts';
|
||||
import { saveGuildActivityIndexMemory } from '../../../services/log/memoryLogService';
|
||||
|
||||
export default function (app: Application) {
|
||||
new HandlerService(app, {});
|
||||
@@ -213,4 +214,12 @@ export class GuildActivityRemote {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
|
||||
public saveGuildActivityIndexMemory() {
|
||||
try {
|
||||
return saveGuildActivityIndexMemory();
|
||||
} catch(e) {
|
||||
errlogger.error(`remote ${__filename} \n ${e.stack}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user