修复 EndTime 类型问题

This commit is contained in:
Suwings 2021-12-25 17:43:16 +08:00
parent d68cb9aad1
commit 2f6a10ac37
2 changed files with 5 additions and 7 deletions

View File

@ -1,7 +1,7 @@
/*
* @Author: Copyright(c) 2020 Suwings
* @Date: 2021-05-12 12:04:13
* @LastEditTime: 2021-08-14 16:39:07
* @LastEditTime: 2021-12-25 17:35:54
* @Description:
* @Projcet: MCSManager Daemon
@ -11,8 +11,6 @@ import { IDockerConfig } from "./interface";
// @Entity
export default class InstanceConfig {
public nickname = "Undefined";
public startCommand = "";
public stopCommand = "^C";
@ -23,7 +21,7 @@ export default class InstanceConfig {
public lastDatetime = "--";
public type = Instance.TYPE_UNIVERSAL; // Instance type like: Minecraft,Webwhell...
public tag: string[] = []; // Instance tag like: Cloud1 Group2...
public endTime: number = null;
public endTime: string = "";
public processType: string = "general";
// Event task
@ -31,7 +29,7 @@ export default class InstanceConfig {
autoStart: false,
autoRestart: false,
ignore: false
}
};
// Extend
public docker: IDockerConfig = {
@ -50,5 +48,5 @@ export default class InstanceConfig {
ip: "",
port: 25565,
type: 1
}
};
}

View File

@ -91,7 +91,7 @@ export default class Instance extends EventEmitter {
this.configureParams(this.config, cfg, "cwd", String);
this.configureParams(this.config, cfg, "ie", String);
this.configureParams(this.config, cfg, "oe", String);
this.configureParams(this.config, cfg, "endTime", Number);
this.configureParams(this.config, cfg, "endTime", String);
this.configureParams(this.config, cfg, "processType", String);
if (cfg.docker) {
this.configureParams(this.config.docker, cfg.docker, "image", String);