diff --git a/theodolite/src/main/kotlin/theodolite/execution/operator/BenchmarkStateChecker.kt b/theodolite/src/main/kotlin/theodolite/execution/operator/BenchmarkStateChecker.kt index a889b9c7afd8f96a5f508de5c704f2723a250719..e21366ce6bb94eef8523c5ebbbe26394acbaccac 100644 --- a/theodolite/src/main/kotlin/theodolite/execution/operator/BenchmarkStateChecker.kt +++ b/theodolite/src/main/kotlin/theodolite/execution/operator/BenchmarkStateChecker.kt @@ -18,6 +18,16 @@ class BenchmarkStateChecker( private val client: NamespacedKubernetesClient ) { + + fun start(running: Boolean) { + Thread { + while (running) { + updateBenchmarkStatus() + Thread.sleep(100 * 1) + } + }.start() + } + /** * Checks and updates the states off all deployed benchmarks. * diff --git a/theodolite/src/main/kotlin/theodolite/execution/operator/TheodoliteController.kt b/theodolite/src/main/kotlin/theodolite/execution/operator/TheodoliteController.kt index e6fb2eadab0b12568439f2dae80995e9acd887a4..ff5e769d6074f4c2c94da3b5b84a704eaa5be2cd 100644 --- a/theodolite/src/main/kotlin/theodolite/execution/operator/TheodoliteController.kt +++ b/theodolite/src/main/kotlin/theodolite/execution/operator/TheodoliteController.kt @@ -41,7 +41,7 @@ class TheodoliteController( sleep(5000) // wait until all states are correctly set while (true) { reconcile() - benchmarkSateChecker.updateBenchmarkStatus() + benchmarkSateChecker.start(true) sleep(2000) } } @@ -49,7 +49,6 @@ class TheodoliteController( private fun reconcile() { do { val execution = getNextExecution() - benchmarkSateChecker.updateBenchmarkStatus() if (execution != null) { val benchmark = getBenchmarks() .map { it.spec }