Refactored code for performance and readability

This commit is contained in:
William Woods 2023-04-03 07:11:21 +00:00
parent ef04e156fd
commit 0917e50b70

View File

@ -1,3 +1,5 @@
package com.twitter.follow_recommendations.common.clients.geoduck
import com.twitter.finagle.stats.StatsReceiver
import com.twitter.follow_recommendations.common.models.GeohashAndCountryCode
import com.twitter.stitch.Stitch
@ -8,6 +10,7 @@ class UserLocationFetcher @Inject() (
locationServiceClient: LocationServiceClient,
reverseGeocodeClient: ReverseGeocodeClient,
statsReceiver: StatsReceiver) {
private val stats = statsReceiver.scope("user_location_fetcher")
def getGeohashAndCountryCode(userId: Option[Long], ipAddress: Option[String]): Stitch[Option[GeohashAndCountryCode]] = {