拍卖行:定时刷新、结算和简单测试,个别bug修复
This commit is contained in:
@@ -21,6 +21,7 @@ import { getMailContent, sendMail } from './mailService';
|
||||
import { reportOnline } from '../pubUtils/httpUtil';
|
||||
import User, { UserModel } from '../db/User';
|
||||
import { getGuildActivityByDic, getGuildActivityRank } from './guildActivityService';
|
||||
import { sendUngotDividend, startGuildAuction, startWorldAuction, stopAuction } from './auctionService';
|
||||
const PER_SECOND = 1 * 1000;
|
||||
const PER_DAY = 24 * 60 * 60;
|
||||
const SETTLE_DIFF = 29 * 60;
|
||||
@@ -68,6 +69,8 @@ export async function init() {
|
||||
scheduleJob('reportOnline', '0 0/5 * * * *', reportOnlineSchedule);
|
||||
|
||||
guildActivitySchedule();
|
||||
// 拍卖行刷新:拍卖阶段刷新,分红发放
|
||||
auctionSchedule();
|
||||
}
|
||||
|
||||
function setPvpSeasonSchdule() {
|
||||
@@ -389,4 +392,11 @@ export async function guildActivitySeconds() {
|
||||
for(let { id } of servers) {
|
||||
await pinus.app.rpc.guild.guildActivityRemote.sendRankToGuilds.toServer(id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function auctionSchedule() {
|
||||
scheduleJob('startGuildAuction', '0 0 20 20 * ?', startGuildAuction);
|
||||
scheduleJob('startWorldAuction', '0 0 20 30 * ?', startWorldAuction);
|
||||
scheduleJob('stopAuction', '0 0 22 00 * ?', stopAuction);
|
||||
scheduleJob('sendUngotDividend', '0 0 5 00 * ?', sendUngotDividend);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user