diff --git a/src/entity/commands/dispatcher.ts b/src/entity/commands/dispatcher.ts index 093bcfa..824fd8b 100644 --- a/src/entity/commands/dispatcher.ts +++ b/src/entity/commands/dispatcher.ts @@ -39,9 +39,9 @@ import GeneralUpdateCommand from "./general/general_update"; // 实例功能调度器 // 根据不同的类型调度分配不同的功能 -export default class FuntionDispatcher extends InstanceCommand { +export default class FunctionDispatcher extends InstanceCommand { constructor() { - super("FuntionDispatcher"); + super("FunctionDispatcher"); } async exec(instance: Instance) { diff --git a/src/entity/commands/start.ts b/src/entity/commands/start.ts index 5512972..8f7fcd8 100644 --- a/src/entity/commands/start.ts +++ b/src/entity/commands/start.ts @@ -25,7 +25,7 @@ import fs from "fs-extra"; import InstanceCommand from "./base/command"; import * as childProcess from "child_process"; -import FuntionDispatcher from "./dispatcher"; +import FunctionDispatcher from "./dispatcher"; class StartupError extends Error { constructor(msg: string) { diff --git a/src/entity/instance/instance.ts b/src/entity/instance/instance.ts index 01ab4cc..6295d41 100644 --- a/src/entity/instance/instance.ts +++ b/src/entity/instance/instance.ts @@ -28,7 +28,7 @@ import InstanceConfig from "./Instance_config"; import StorageSubsystem from "../../common/system_storage"; import { LifeCycleTaskManager } from "./life_cycle"; import { PresetCommandManager } from "./preset"; -import FuntionDispatcher from "../commands/dispatcher"; +import FunctionDispatcher from "../commands/dispatcher"; import { IInstanceProcess } from "./interface"; import StartCommand from "../commands/start"; import { configureEntityParams } from "../../common/typecheck"; @@ -112,13 +112,13 @@ export default class Instance extends EventEmitter { if (cfg.type && cfg.type != this.config.type) { if (this.status() != Instance.STATUS_STOP) throw new Error("正在运行时无法修改此实例类型"); configureEntityParams(this.config, cfg, "type", String); - this.forceExec(new FuntionDispatcher()); + this.forceExec(new FunctionDispatcher()); } // 若进程类型改变,则必须重置预设命令与生命周期事件 if (cfg.processType && cfg.processType !== this.config.processType) { if (this.status() != Instance.STATUS_STOP) throw new Error("正在运行时无法修改此实例进程类型"); configureEntityParams(this.config, cfg, "processType", String); - this.forceExec(new FuntionDispatcher()); + this.forceExec(new FunctionDispatcher()); } configureEntityParams(this.config, cfg, "nickname", String); configureEntityParams(this.config, cfg, "startCommand", String); diff --git a/src/service/system_instance.ts b/src/service/system_instance.ts index 0b7025b..a1b217a 100644 --- a/src/service/system_instance.ts +++ b/src/service/system_instance.ts @@ -34,7 +34,7 @@ import StorageSubsystem from "../common/system_storage"; import InstanceConfig from "../entity/instance/Instance_config"; import InstanceStreamListener from "../common/instance_stream"; import { QueryMapWrapper } from "../common/query_wrapper"; -import FuntionDispatcher from "../entity/commands/dispatcher"; +import FunctionDispatcher from "../entity/commands/dispatcher"; import InstanceControl from "./system_instance_control"; import StartCommand from "../entity/commands/start"; @@ -77,7 +77,7 @@ class InstanceSubsystem extends EventEmitter { const instance = new Instance(uuid, instanceConfig); // 所有实例全部进行功能调度器 instance - .forceExec(new FuntionDispatcher()) + .forceExec(new FunctionDispatcher()) .then((v) => {}) .catch((v) => {}); this.addInstance(instance); @@ -102,7 +102,7 @@ class InstanceSubsystem extends EventEmitter { } // 根据参数构建并初始化类型 instance.parameters(cfg); - instance.forceExec(new FuntionDispatcher()); + instance.forceExec(new FunctionDispatcher()); this.addInstance(instance); return instance; }