feat(gvg): 征战中原排行榜奖励

This commit is contained in:
luying
2023-02-04 12:08:29 +08:00
parent fc2a86ad81
commit eb772484c2
21 changed files with 678 additions and 100 deletions

View File

@@ -44,6 +44,7 @@ import { HiddenDataModel, HiddenDataModelType } from '../db/HiddenData';
import { setHiddenData, setHiddenDataToMemory } from './dataService';
import { GVGConfigModel } from '../db/GVGConfig';
import { createNewGVGConfig, initLeaguePrepare } from './gvg/gvgService';
import { saveVestigeRankSchedule } from './gvg/gvgFightService';
const PER_SECOND = 1 * 1000;
const PER_DAY = 24 * 60 * 60;
@@ -905,11 +906,12 @@ export async function initGVGConfigSchedule() {
scheduleJob(`gvgConfig`, config.scheduleTime * 1000, createNewGVGConfig);
console.log('##### initGVGConfigSchedule', nowSeconds(), config.prepareTime)
if(nowSeconds() > config.prepareTime) {
initLeaguePrepare();
} else {
scheduleJob(`gvgPrepare`, config.prepareTime * 1000, initLeaguePrepare);
}
scheduleJob('gvgFightSchedule', '0 0 22 * * ?', saveVestigeRankSchedule);
}
// —————————————— gvg end —————————————— //