From 567a29642824603ad5333738b6b2f883a1f1dbbb Mon Sep 17 00:00:00 2001 From: nilsarne Date: Fri, 19 Apr 2024 16:52:14 +0200 Subject: [PATCH] Lagt til exchangeTimeout --- .../soknadsarkiverer/config/RestClientConfig.kt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arkiverer/src/main/kotlin/no/nav/soknad/arkivering/soknadsarkiverer/config/RestClientConfig.kt b/arkiverer/src/main/kotlin/no/nav/soknad/arkivering/soknadsarkiverer/config/RestClientConfig.kt index 5e07d18a..f369bcaa 100644 --- a/arkiverer/src/main/kotlin/no/nav/soknad/arkivering/soknadsarkiverer/config/RestClientConfig.kt +++ b/arkiverer/src/main/kotlin/no/nav/soknad/arkivering/soknadsarkiverer/config/RestClientConfig.kt @@ -57,8 +57,9 @@ class RestClientConfig { private fun timeouts(readTimeoutMinutes: Long, connectTimeoutSeconds: Long): ReactorNettyClientRequestFactory { val factory = ReactorNettyClientRequestFactory() - factory.setReadTimeout(Duration.ofMinutes(4 * 60L)) - factory.setConnectTimeout(Duration.ofSeconds(2L)) + factory.setReadTimeout(Duration.ofMinutes(readTimeoutMinutes)) + factory.setConnectTimeout(Duration.ofSeconds(connectTimeoutSeconds)) + factory.setExchangeTimeout(Duration.ofMinutes(readTimeoutMinutes)) return factory } @@ -75,7 +76,7 @@ class RestClientConfig { return restClientOAuth2Client( baseUrl = innsendingApiProperties.host, - timeouts = timeouts(fileFetchTimeoutProperties.readTimeout.toLong(), fileFetchTimeoutProperties.connectTimeout.toLong()), + timeouts = timeouts(readTimeoutMinutes = fileFetchTimeoutProperties.readTimeout.toLong(), connectTimeoutSeconds = fileFetchTimeoutProperties.connectTimeout.toLong()), clientAccessProperties = clientConfigProperties.registration["innsendingApi"]!!, oAuth2AccessTokenService = oAuth2AccessTokenService ) @@ -135,7 +136,6 @@ class RestClientConfig { fun healthApi(filestorageProperties: FilestorageProperties) = HealthApi(filestorageProperties.host) - private fun restClientOAuth2Client( baseUrl: String, timeouts: ReactorNettyClientRequestFactory,