summaryrefslogtreecommitdiff
path: root/src/main/kotlin/dev/dnpm
diff options
context:
space:
mode:
authorPaul-Christian Volkmer2025-03-20 14:39:40 +0100
committerPaul-Christian Volkmer2025-03-20 14:39:40 +0100
commit47ebe46974dcd7c6078d7a9a7f0a541f39d82c64 (patch)
tree2643cdef88df84530173683f08ade88873ca85bc /src/main/kotlin/dev/dnpm
parentf347653be83682e95606358ac25242a219508236 (diff)
feat: add checks for DNPM:DIP backend
Since DNPM:DIP responds with HTTP 404 on API base path, the Kaplan-Meier Config endpoint will be used to check availability of DNPM:DIP backend API.
Diffstat (limited to 'src/main/kotlin/dev/dnpm')
-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