Compare commits
7 Commits
ad9e3cca46
...
f9deacd411
Author | SHA1 | Date | |
---|---|---|---|
![]() |
f9deacd411 | ||
c2b1a6cb0b | |||
![]() |
7676fc3142 | ||
![]() |
2af3bf426b | ||
![]() |
89af066d12 | ||
![]() |
8dfe0b4ce8 | ||
![]() |
55fae245e9 |
4050
package-lock.json
generated
4050
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -37,6 +37,7 @@
|
|||||||
"axios": "^1.4.0",
|
"axios": "^1.4.0",
|
||||||
"crypto-js": "^4.1.1",
|
"crypto-js": "^4.1.1",
|
||||||
"express": "^4.18.2",
|
"express": "^4.18.2",
|
||||||
|
"inspector-api": "^1.4.8",
|
||||||
"ioredis": "^5.3.2",
|
"ioredis": "^5.3.2",
|
||||||
"json5": "^2.2.3",
|
"json5": "^2.2.3",
|
||||||
"mathjs": "^11.4.0",
|
"mathjs": "^11.4.0",
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
import { ApiCall } from "tsrpc";
|
import { ApiCall } from "tsrpc";
|
||||||
import { Reqheapdump, Resheapdump } from "../../monopoly/protocols/games/Ptlheapdump";
|
import { Reqheapdump, Resheapdump } from "../../monopoly/protocols/games/Ptlheapdump";
|
||||||
var heapdump = require('heapdump');
|
var heapdump = require('heapdump');
|
||||||
|
import Inspector from 'inspector-api'
|
||||||
|
const inspector = new Inspector({ storage: { type: 'fs' } })
|
||||||
|
|
||||||
export default async function (call: ApiCall<Reqheapdump, Resheapdump>) {
|
export default async function (call: ApiCall<Reqheapdump, Resheapdump>) {
|
||||||
|
|
||||||
@ -20,4 +22,24 @@ export default async function (call: ApiCall<Reqheapdump, Resheapdump>) {
|
|||||||
data:"gc..."
|
data:"gc..."
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(call.req.act == "cpustart"){
|
||||||
|
await inspector.profiler.enable()
|
||||||
|
await inspector.profiler.start()
|
||||||
|
console.log('CPU profile has been start')
|
||||||
|
call.succ({
|
||||||
|
code:200,
|
||||||
|
data:"profiler.start"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
if(call.req.act == "cpustop"){
|
||||||
|
await inspector.profiler.stop()
|
||||||
|
await inspector.profiler.disable()
|
||||||
|
console.log('CPU profile has been stop')
|
||||||
|
call.succ({
|
||||||
|
code:200,
|
||||||
|
data:"profiler.cpustop"
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
@ -396,7 +396,7 @@ export class HuoDongHongDianFun {
|
|||||||
return {show: true}
|
return {show: true}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let i = 1; i++; i <= data.taskval.length) {
|
for (let i = 1; i <= data.taskval.length; i++) {
|
||||||
if (data?.taskval[i] >= _hd?.data?.task?.[i]?.pval && !data?.taskfinish.find(v => v == i + '')) {
|
if (data?.taskval[i] >= _hd?.data?.task?.[i]?.pval && !data?.taskfinish.find(v => v == i + '')) {
|
||||||
return {show: true}
|
return {show: true}
|
||||||
}
|
}
|
||||||
|
@ -72,10 +72,11 @@ async function main() {
|
|||||||
await patchInit()
|
await patchInit()
|
||||||
let patch = new Path();
|
let patch = new Path();
|
||||||
await patch.run();
|
await patch.run();
|
||||||
setInterval(() => {
|
|
||||||
console.log(new Date().format("MM-dd hh:mm:ss"));
|
|
||||||
}, 1000);
|
|
||||||
console.log("逻辑执行完成,等待退出");
|
console.log("逻辑执行完成,等待退出");
|
||||||
|
setTimeout(function() {
|
||||||
|
console.log('结束程序');
|
||||||
|
process.exit();
|
||||||
|
}, 3000);
|
||||||
}
|
}
|
||||||
|
|
||||||
main();
|
main();
|
||||||
|
45
src/fix_patch/patch_rank_delData.ts
Normal file
45
src/fix_patch/patch_rank_delData.ts
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
import { patchFun, patchInit } from "../patch";
|
||||||
|
|
||||||
|
class Path{
|
||||||
|
@patchFun
|
||||||
|
async fun1(a:any) {
|
||||||
|
//这里执行脚本的内容,加了patchFun的函数,不允许重复执行
|
||||||
|
console.log("这是第1个脚本里内容");
|
||||||
|
G.ioredis.del(`rank:kfjs1:data`);
|
||||||
|
G.ioredis.del(`rank:kfjs2:data`);
|
||||||
|
G.ioredis.del(`rank:kfjs3:data`);
|
||||||
|
G.ioredis.del(`rank:kfjs4:data`);
|
||||||
|
G.ioredis.del(`rank:kfjs5:data`);
|
||||||
|
G.ioredis.del(`rank:kfjs6:data`);
|
||||||
|
G.ioredis.del(`rank:kfjs7:data`);
|
||||||
|
G.ioredis.del(`rank:slzd1:data`);
|
||||||
|
G.ioredis.del(`rank:slzd2:data`);
|
||||||
|
G.ioredis.del(`rank:slzd3:data`);
|
||||||
|
G.ioredis.del(`rank:slzd4:data`);
|
||||||
|
G.ioredis.del(`rank:slzd5:data`);
|
||||||
|
G.ioredis.del(`rank:slzd6:data`);
|
||||||
|
G.ioredis.del(`rank:qjzzd:data`);
|
||||||
|
G.ioredis.del(`rank:tanxian:data`);
|
||||||
|
G.ioredis.del(`rank:tujian:data`);
|
||||||
|
G.ioredis.del(`rank:zccg:data`);
|
||||||
|
G.ioredis.del(`rank:zhanli:data`);
|
||||||
|
console.log("这是第1个脚本执行完成");
|
||||||
|
return 12
|
||||||
|
}
|
||||||
|
|
||||||
|
async run(){
|
||||||
|
await this.fun1(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function main(){
|
||||||
|
await patchInit()
|
||||||
|
let patch = new Path();
|
||||||
|
await patch.run();
|
||||||
|
console.log("逻辑执行完成,等待退出");
|
||||||
|
setTimeout(function() {
|
||||||
|
console.log('结束程序');
|
||||||
|
process.exit();
|
||||||
|
}, 3000);
|
||||||
|
}
|
||||||
|
main();
|
@ -25,9 +25,10 @@ async function main(){
|
|||||||
await patchInit()
|
await patchInit()
|
||||||
let patch = new Path();
|
let patch = new Path();
|
||||||
await patch.run();
|
await patch.run();
|
||||||
setInterval(() => {
|
|
||||||
console.log(new Date().format("MM-dd hh:mm:ss"));
|
|
||||||
}, 1000);
|
|
||||||
console.log("逻辑执行完成,等待退出");
|
console.log("逻辑执行完成,等待退出");
|
||||||
|
setTimeout(function() {
|
||||||
|
console.log('结束程序');
|
||||||
|
process.exit();
|
||||||
|
}, 3000);
|
||||||
}
|
}
|
||||||
main();
|
main();
|
||||||
|
Loading…
Reference in New Issue
Block a user