mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-20 07:43:12 +09:00
Refactor InstanceInfo
Refactor to store instance status, gamePort, and updatedAt to disk for instances. This enables InstanceDetails to properly record when it was updated.
This commit is contained in:
1 parent
c248363895
commit
d186f85773
7 files changed
+109
-118
No files matched your search
@@ -913,6 +913,7 @@ export default class Host extends lib.Link {
|
||||
list.push(new lib.RawInstanceInfo(
|
||||
instanceInfo.config.serialize("controller"),
|
||||
instanceConnection ? instanceConnection.instance.status : "stopped",
|
||||
instanceConnection ? instanceConnection.instance.server.gamePort : undefined,
|
||||
));
|
||||
}
|
||||
await this.send(new lib.InstancesUpdateRequest(list));
|
||||
|
||||
@@ -446,7 +446,7 @@ rcon.print(game.table_to_json(players))`.replace(/\r?\n/g, " ");
|
||||
new lib.InstanceStatusChangedEvent(
|
||||
this.id,
|
||||
status,
|
||||
this.server.gamePort || this.config.get("factorio.game_port") || undefined,
|
||||
status !== "stopped" ? this.server.gamePort : undefined,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user