mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-22 08:13:12 +09:00
Fix instance deleted status not being sent out
This commit is contained in:
1 parent
7a49e8aa15
commit
f37c387d52
3 files changed
+6
-5
No files matched your search
@@ -374,7 +374,7 @@ let instanceProperties = {
|
|||||||
"assigned_slave": { type: ["null", "integer"] },
|
"assigned_slave": { type: ["null", "integer"] },
|
||||||
"status": { enum: [
|
"status": { enum: [
|
||||||
"unknown", "unassigned", "stopped", "starting", "running", "stopping",
|
"unknown", "unassigned", "stopped", "starting", "running", "stopping",
|
||||||
"creating_save", "exporting_data",
|
"creating_save", "exporting_data", "deleted",
|
||||||
]},
|
]},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -252,7 +252,7 @@ class ControlConnection extends BaseConnection {
|
|||||||
|
|
||||||
let prev = instance.status;
|
let prev = instance.status;
|
||||||
instance.status = "deleted";
|
instance.status = "deleted";
|
||||||
this.instanceUpdated(instance);
|
this._master.instanceUpdated(instance);
|
||||||
await libPlugin.invokeHook(this._master.plugins, "onInstanceStatusChanged", instance, prev);
|
await libPlugin.invokeHook(this._master.plugins, "onInstanceStatusChanged", instance, prev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -501,9 +501,10 @@ describe("Integration of Clusterio", function() {
|
|||||||
|
|
||||||
describe("instanceUpdateEventHandler()", function() {
|
describe("instanceUpdateEventHandler()", function() {
|
||||||
it("should have triggered for the previous instance status updates", function() {
|
it("should have triggered for the previous instance status updates", function() {
|
||||||
let statusesToCheck = new Set(
|
let statusesToCheck = new Set([
|
||||||
["unassigned", "stopped", "creating_save", "exporting_data", "starting", "running", "stopping"]
|
"unassigned", "stopped", "creating_save", "exporting_data",
|
||||||
);
|
"starting", "running", "stopping", "deleted",
|
||||||
|
]);
|
||||||
let statusesNotSeen = new Set(statusesToCheck);
|
let statusesNotSeen = new Set(statusesToCheck);
|
||||||
|
|
||||||
for (let update of getControl().instanceUpdates) {
|
for (let update of getControl().instanceUpdates) {
|
||||||
|
|||||||
Reference in new issue
Block a user