summaryrefslogtreecommitdiff
path: root/src/main/kotlin
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin')
-rw-r--r--src/main/kotlin/dev/dnpm/etl/processor/monitoring/ConnectionCheckService.kt10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main/kotlin/dev/dnpm/etl/processor/monitoring/ConnectionCheckService.kt b/src/main/kotlin/dev/dnpm/etl/processor/monitoring/ConnectionCheckService.kt
index e70da3e..9d96654 100644
--- a/src/main/kotlin/dev/dnpm/etl/processor/monitoring/ConnectionCheckService.kt
+++ b/src/main/kotlin/dev/dnpm/etl/processor/monitoring/ConnectionCheckService.kt
@@ -121,7 +121,15 @@ class RestConnectionCheckService(
fun check() {
result = try {
val available = restTemplate.getForEntity(
- restTargetProperties.uri?.replace("/etl/api", "").toString(),
+ if (restTargetProperties.isBwhc) {
+ UriComponentsBuilder.fromUriString(restTargetProperties.uri.toString()).path("").toUriString()
+ } else {
+ UriComponentsBuilder.fromUriString(restTargetProperties.uri.toString())
+ .pathSegment("mtb")
+ .pathSegment("kaplan-meier")
+ .pathSegment("config")
+ .toUriString()
+ },
String::class.java
).statusCode == HttpStatus.OK