Skip to content
This repository has been archived by the owner on Apr 1, 2024. It is now read-only.

Commit

Permalink
Merge pull request #20 from nuomiaa/master
Browse files Browse the repository at this point in the history
修正 拼写错误
  • Loading branch information
YuMao233 authored Mar 18, 2022
2 parents e9714ba + 9d2c3a8 commit 46ac2f9
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/entity/commands/dispatcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/entity/commands/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
6 changes: 3 additions & 3 deletions src/entity/instance/instance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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);
Expand Down
6 changes: 3 additions & 3 deletions src/service/system_instance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down Expand Up @@ -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);
Expand All @@ -102,7 +102,7 @@ class InstanceSubsystem extends EventEmitter {
}
// 根据参数构建并初始化类型
instance.parameters(cfg);
instance.forceExec(new FuntionDispatcher());
instance.forceExec(new FunctionDispatcher());
this.addInstance(instance);
return instance;
}
Expand Down

0 comments on commit 46ac2f9

Please sign in to comment.