Skip to content

Commit

Permalink
Bump version and context http client
Browse files Browse the repository at this point in the history
  • Loading branch information
yatharthranjan committed Jun 24, 2021
1 parent a9e32da commit 8475338
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ description = "RADAR Push API Gateway to handle secured data flow to backend."

allprojects {
group = "org.radarbase"
version = "0.1.2"
version = "0.2.0"

repositories {
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import java.util.concurrent.TimeUnit
*/
class BackfillService(
@Context private val config: Config,
@Context private val httpClient: OkHttpClient,
@Named(GARMIN_QUALIFIER) private val userRepository: GarminUserRepository
) : ApplicationEventListener {

Expand All @@ -44,10 +45,7 @@ class BackfillService(
redisHolder,
config.pushIntegration.garmin.backfill.redis.lockPrefix
)
private val httpClient = OkHttpClient.Builder()
.connectTimeout(30, TimeUnit.SECONDS)
.readTimeout(30, TimeUnit.SECONDS)
.build()

private val requestsPerUserPerIteration: Int
get() = 40

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ import java.util.concurrent.ConcurrentHashMap
@Suppress("UNCHECKED_CAST")
class GarminServiceUserRepository(
@Context private val config: Config,
@Context private val client: OkHttpClient,
@Context private val objectReaderFactory: ObjectReaderFactory,
) : GarminUserRepository(config) {
private val garminConfig: GarminConfig = config.pushIntegration.garmin
private val client: OkHttpClient = OkHttpClient()
private val cachedCredentials: ConcurrentHashMap<String, OAuth1UserCredentials> =
ConcurrentHashMap<String, OAuth1UserCredentials>()
private var nextFetch = MIN_INSTANT
Expand Down

0 comments on commit 8475338

Please sign in to comment.