还原
This commit is contained in:
parent
a1c7f2e4d0
commit
1fcedaff59
@ -38,8 +38,7 @@ export type schedulerType =
|
||||
| 'hbzb_zbs_group'
|
||||
| 'wzry_zuanshi16to8'
|
||||
| "cross_email_pull"
|
||||
| "xiaofeijingsai_local_ctor"
|
||||
| "local_data_warn"
|
||||
| "xiaofeijingsai_local_ctor";
|
||||
|
||||
export class SchedulerManage {
|
||||
static logTime = false;
|
||||
|
@ -1,58 +0,0 @@
|
||||
import {Scheduler, schedulerType} from "./scheduler";
|
||||
import {EmailFun} from "../email";
|
||||
import {ActionLog} from "../actionLog/actionLog";
|
||||
|
||||
export class Scheduler_dataWarn extends Scheduler {
|
||||
id: schedulerType = "local_data_warn";
|
||||
|
||||
time = 30; // 10分钟检测一次数据异常
|
||||
|
||||
name = "玩家数据异常监测"
|
||||
|
||||
type = ""
|
||||
|
||||
async read() {
|
||||
await this.ctorStartTime();
|
||||
this.isReady = false;
|
||||
this.startTime = this.nextTime;
|
||||
}
|
||||
|
||||
async start() {
|
||||
|
||||
let users = (await G.mongodb.collection('user').find({newonlinetime: {$gte: G.time - 330, $lte: G.time + 30}},
|
||||
{projection: {uid: 1, sid: 1, name: 1, lv: 1, vip: 1}}).toArray())
|
||||
.map(i => {
|
||||
let {_id, ...other} = i
|
||||
return other
|
||||
})
|
||||
|
||||
if (!users.length) return
|
||||
|
||||
let logs = await G.mongodb.collection('actionLog').find({
|
||||
uid: {$in: users.map(i => i.uid)},
|
||||
type: 'day'
|
||||
}).toArray()
|
||||
|
||||
console.log(logs)
|
||||
|
||||
// ActionLog.addDayLog(player.uid, { key: 'pay', val: conf.payExp[0].n });
|
||||
// ActionLog.addRetainLog(player.uid, { key: 'pay', val: conf.payExp[0].n });
|
||||
|
||||
|
||||
await this.ctorStartTime()
|
||||
}
|
||||
|
||||
get nextTime(): number {
|
||||
return G.time + this.time;
|
||||
}
|
||||
|
||||
async ctorStartTime() {
|
||||
this.isStart = false;
|
||||
this.startTime = this.nextTime;
|
||||
}
|
||||
}
|
||||
|
||||
function addWarnLog(user) {
|
||||
|
||||
|
||||
}
|
@ -29,7 +29,6 @@ import { SchedulerManage } from './public/scheduler/scheduler';
|
||||
import {CrossEmailPull} from "./public/scheduler/scheduler_cross_email_pull";
|
||||
import {Scheduler_xfjs_Local_Ctor} from "./public/scheduler/scheduler_xiaofeijingsai";
|
||||
import { RankKfjs_1, RankKfjs_2, RankKfjs_3, RankKfjs_4, RankKfjs_5, RankKfjs_6, RankKfjs_7 } from './public/rank/rank_kfjs';
|
||||
import {Scheduler_dataWarn} from "./public/scheduler/scheduler_dataWarn";
|
||||
export async function startAfter() {
|
||||
|
||||
//事件监听和定时器初始化
|
||||
@ -91,8 +90,6 @@ export async function startAfter() {
|
||||
new SchedulerWzryAutoBaoMing().init();
|
||||
new SchedulerWzryjingcaiSendPrize().init();
|
||||
new SchedulerWzryendDel().init();
|
||||
|
||||
new Scheduler_dataWarn().init()
|
||||
// new SchedulerWzrycrossEmail();
|
||||
|
||||
new CrossEmailPull().init()
|
||||
|
Loading…
Reference in New Issue
Block a user