Skip to content

Commit

Permalink
Op 7784 v3.9 (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pranav-b-7 authored Oct 19, 2021
1 parent 973b7e7 commit 12742af
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
8 changes: 8 additions & 0 deletions docker_build/gate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ services:
enabled: true
oesui:
externalUrl: http://150.238.22.102

retrofit:
connectTimeout: 30000
readTimeout: 30000
callTimeout: 30000
writeTimeout: 30000
retryOnConnectionFailure: true

security:
basic:
enabled: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,37 @@
package com.netflix.spinnaker.gate.config

import com.netflix.spinnaker.config.OkHttp3ClientConfiguration
import groovy.transform.Canonical
import okhttp3.OkHttpClient
import org.springframework.beans.factory.config.ConfigurableBeanFactory
import org.springframework.boot.context.properties.ConfigurationProperties
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.springframework.context.annotation.Scope

import java.util.concurrent.TimeUnit

@Canonical
@Configuration
@ConfigurationProperties(prefix = "retrofit")
class RetrofitConfig {

Long connectTimeout
Long readTimeout
Long callTimeout
Long writeTimeout
Boolean retryOnConnectionFailure

@Bean
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
OkHttpClient okHttpClient(OkHttp3ClientConfiguration okHttpClientConfig) {
return okHttpClientConfig.create().build()
return okHttpClientConfig.create()
.connectTimeout(connectTimeout, TimeUnit.MILLISECONDS)
.readTimeout(readTimeout, TimeUnit.MILLISECONDS)
.callTimeout(callTimeout, TimeUnit.MILLISECONDS)
.writeTimeout(writeTimeout, TimeUnit.MILLISECONDS)
.retryOnConnectionFailure(retryOnConnectionFailure)
.build()
}

}

0 comments on commit 12742af

Please sign in to comment.