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:
Hornwitser committed 2020-01-04 17:34:16 +01:00
1 parent 0e9cd35c30
commit 6cf16cc09e
4 files changed
+6 -11

No files matched your search

+1 -1
View File
@@ -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);