Fix statistics_exporter sending commands before start

Fix statistics_exporter potentially sending commands before an instance
is started when metrics are collected.
This commit is contained in:
Hornwitser committed 2021-10-01 01:52:18 +02:00
1 parent c40362fa7f
commit 2b101d594a
3 files changed
+12

No files matched your search

+4
View File
@@ -77,6 +77,10 @@ class InstancePlugin extends libPlugin.BaseInstancePlugin {
}
async onMetrics() {
if (this.instance.status !== "running") {
return;
}
// Wait configured timeout for the metrics to be collected. It may
// take a long time for the command to go through if the command
// stream is overloaded. Should the timeout be exceeded the