mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-17 15:33:12 +09:00
Reference by global in statistics_exporter
Store export function in a global table in the lua module for statistics exporter in order to avoid a remote.call.
This commit is contained in:
1 parent
0e9cd35c30
commit
6cf16cc09e
4 files changed
+6
-11
No files matched your search
@@ -22,7 +22,7 @@ const instanceGameFlowStatistics = new Gauge(
|
||||
|
||||
class InstancePlugin extends plugin.BaseInstancePlugin {
|
||||
async onMetrics() {
|
||||
let string = await this.instance.server.sendRcon('/sc remote.call("statistics_exporter", "export")');
|
||||
let string = await this.instance.server.sendRcon('/sc statistics_exporter.export()');
|
||||
let stats;
|
||||
try {
|
||||
stats = JSON.parse(string);
|
||||
|
||||
Reference in new issue
Block a user