mirror of
https://github.com/MCSManager/MCSManager.git
synced 2024-11-21 03:12:10 +08:00
优化 No unused 注解
This commit is contained in:
parent
a1e5dfa35d
commit
f4d32c780a
@ -21,6 +21,7 @@ module.exports = {
|
||||
"$": "writeable",
|
||||
"WS": "readonly",
|
||||
"hex_md5": "readonly",
|
||||
"process": "readonly"
|
||||
|
||||
},
|
||||
"parserOptions": {
|
||||
|
@ -41,6 +41,7 @@ class DataModel {
|
||||
upload(that, needkey) {
|
||||
let key = null;
|
||||
if (needkey == undefined) {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
for (var mineKey in this) {
|
||||
that[key] = this[key];
|
||||
}
|
||||
|
@ -187,6 +187,7 @@ class ServerManager extends EventEmitter {
|
||||
|
||||
getServerCounter() {
|
||||
let tmp = 0;
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
for (let k in this.serverList) tmp++;
|
||||
return tmp;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
//用户模型
|
||||
|
||||
const DataModel = require("../DataModel");
|
||||
const { md5, createPassword, randomString } = require("./CryptoMine");
|
||||
const { createPassword } = require("./CryptoMine");
|
||||
const fs = require("fs");
|
||||
const uuid = require("uuid");
|
||||
|
||||
|
@ -144,6 +144,7 @@ class UserCenter {
|
||||
|
||||
getUserCounter() {
|
||||
let tmp = 0;
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
for (let k in this.userList) tmp++;
|
||||
return tmp;
|
||||
}
|
||||
|
@ -4,9 +4,9 @@ var ftpdzz = require("ftpd");
|
||||
|
||||
var options = null;
|
||||
var FTPserver = null;
|
||||
var rootCwdListener = () => {
|
||||
return "/";
|
||||
}; //默认
|
||||
// var rootCwdListener = () => {
|
||||
// return "/";
|
||||
// }; //默认
|
||||
|
||||
module.exports.initFTPdServerOptions = (_options) => {
|
||||
options = _options;
|
||||
|
@ -50,6 +50,7 @@ module.exports.init = () => {
|
||||
//计次型任务
|
||||
function createScheduleJobCount(id, time, count, commande, servername, callback, _save = true) {
|
||||
let lco = 0;
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
let mask = (MCSERVER.Schedule.container[id] = schedule.scheduleJob(time, (fireDate) => {
|
||||
if (lco >= count && count > 0) {
|
||||
deleteScheduleJob(id);
|
||||
|
@ -2,14 +2,13 @@ const { WebSocketObserver } = require("../../model/WebSocketModel");
|
||||
const counter = require("../../core/counter");
|
||||
const tools = require("../../core/tools");
|
||||
const response = require("../../helper/Response");
|
||||
|
||||
const serverModel = require("../../model/ServerModel");
|
||||
const permssion = require("../../helper/Permission");
|
||||
const userModel = require("../../model/UserModel");
|
||||
const os = require("os");
|
||||
|
||||
const mversion = require("../../helper/version");
|
||||
|
||||
|
||||
const MB_SIZE = 1024 * 1024;
|
||||
let serverM = serverModel.ServerManager();
|
||||
let userM = userModel.userCenter();
|
||||
@ -23,16 +22,6 @@ counter.initData(() => {
|
||||
counter.set("csrfCounter", 0);
|
||||
});
|
||||
|
||||
// var pusage = require('pidusage');
|
||||
// //CPU
|
||||
// //需要刷新的CPU
|
||||
// var cacheCPU = 0;
|
||||
// setInterval(() => {
|
||||
// pusage.stat(process.pid, function(err, stat) {
|
||||
// cacheCPU = stat.cpu.toFixed(1);
|
||||
// })
|
||||
// }, 3000);
|
||||
|
||||
const osUtils = require("os-utils");
|
||||
//系统CPU
|
||||
var cacheCPU = 0;
|
||||
|
@ -1,7 +1,6 @@
|
||||
const { WebSocketObserver } = require("../../../model/WebSocketModel");
|
||||
const response = require("../../../helper/Response");
|
||||
var serverModel = require("../../../model/ServerModel");
|
||||
var userModel = require("../../../model/UserModel");
|
||||
const permssion = require("../../../helper/Permission");
|
||||
|
||||
const mcPingProtocol = require("../../../helper/MCPingProtocol");
|
||||
|
Loading…
Reference in New Issue
Block a user