Skip to content

Commit

Permalink
Lagt til exchangeTimeout
Browse files Browse the repository at this point in the history
  • Loading branch information
nils-arne committed Apr 19, 2024
1 parent 8486434 commit 567a296
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand All @@ -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
)
Expand Down Expand Up @@ -135,7 +136,6 @@ class RestClientConfig {
fun healthApi(filestorageProperties: FilestorageProperties) = HealthApi(filestorageProperties.host)



private fun restClientOAuth2Client(
baseUrl: String,
timeouts: ReactorNettyClientRequestFactory,
Expand Down

0 comments on commit 567a296

Please sign in to comment.