summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/ConsulConfigurationProvider.kt3
1 files changed, 2 insertions, 1 deletions
diff --git a/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/ConsulConfigurationProvider.kt b/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/ConsulConfigurationProvider.kt
index 727f025b..786bc7ce 100644
--- a/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/ConsulConfigurationProvider.kt
+++ b/hv-collector-core/src/main/kotlin/org/onap/dcae/collectors/veshv/impl/adapters/ConsulConfigurationProvider.kt
@@ -64,7 +64,7 @@ internal class ConsulConfigurationProvider(private val url: String,
withFixedPartitioning()
}
}.build())
- ).doOnNext { logger.info("Applied default configuration") }.delayElement(firstRequestDelay)
+ ).doOnNext { logger.info("Applied default configuration") }
private fun createConsulFlux(): Flux<CollectorConfiguration> =
http.get(url, mapOf(Pair("index", lastModifyIndex.get())))
@@ -79,6 +79,7 @@ internal class ConsulConfigurationProvider(private val url: String,
.map(::decodeConfiguration)
.map(::createCollectorConfiguration)
.repeat()
+ .delaySubscription(firstRequestDelay)
private fun parseJsonResponse(responseString: String): JsonObject =
Json.createReader(StringReader(responseString)).readArray().first().asJsonObject()