prometheus hotfix (#670)

This commit is contained in:
msizov
2025-06-02 19:44:44 +07:00
committed by GitHub
parent c8454a8e71
commit 0fd16181be

View File

@@ -91,6 +91,7 @@ class MonitoringSetup(
if (monitoringConfig.prometheus.enabled) { if (monitoringConfig.prometheus.enabled) {
// use standard JVM server with a single thread blocking processing // use standard JVM server with a single thread blocking processing
// prometheus is a single thread periodic call, no reason to setup anything complex // prometheus is a single thread periodic call, no reason to setup anything complex
Thread {
var started = false var started = false
while (true) { while (true) {
if (isTcpPortAvailable(monitoringConfig.prometheus.host, monitoringConfig.prometheus.port)) { if (isTcpPortAvailable(monitoringConfig.prometheus.host, monitoringConfig.prometheus.port)) {
@@ -126,6 +127,7 @@ class MonitoringSetup(
Thread.sleep(1000) Thread.sleep(1000)
} }
} }
}.start()
} }
} }
} }