NTP-58044 | Added event for Bank uptime success sync (#16835)
This commit is contained in:
@@ -74,6 +74,10 @@ class NaviApiPoller(
|
||||
isPollingActive.set(false)
|
||||
}
|
||||
|
||||
fun getCurrentIteration(): Int {
|
||||
return currentCount.get()
|
||||
}
|
||||
|
||||
fun isPollerActive(): Boolean {
|
||||
return isPollingActive.get()
|
||||
}
|
||||
|
||||
@@ -6305,6 +6305,19 @@ class NaviPayAnalytics private constructor() {
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
fun onBankUptimeDataFetchSuccess(
|
||||
iteration: Int,
|
||||
naviPaySessionAttributes: Map<String, String>,
|
||||
) {
|
||||
NaviTrackEvent.trackEventOnClickStream(
|
||||
"NaviPay_BankUptimeDataFetchSuccess",
|
||||
mapOf(
|
||||
"iteration" to iteration.toString(),
|
||||
"naviPaySessionId" to naviPaySessionAttributes["naviPaySessionId"].orEmpty(),
|
||||
),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
inner class NaviPayActivateVpa {
|
||||
|
||||
@@ -13,6 +13,7 @@ import com.navi.common.utils.NaviApiPoller
|
||||
import com.navi.pay.analytics.NaviPayAnalytics
|
||||
import com.navi.pay.common.bankuptime.model.view.toBankUptimeEntity
|
||||
import com.navi.pay.common.bankuptime.repository.BankUptimeRepository
|
||||
import com.navi.pay.common.model.view.NaviPaySessionHelper
|
||||
import com.navi.pay.utils.FIRESTORE_BANK_UPTIME_COLLECTION_PATH
|
||||
import com.navi.pay.utils.parallelMap
|
||||
import javax.inject.Inject
|
||||
@@ -23,6 +24,7 @@ class BankUptimePollerUseCase
|
||||
constructor(
|
||||
private val firestoreDataProvider: FirestoreDataProvider,
|
||||
private val bankUptimeRepository: BankUptimeRepository,
|
||||
private val naviPaySessionHelper: NaviPaySessionHelper,
|
||||
) {
|
||||
private val BANK_UPTIME_POLLING_INTERVAL = 10.minutes
|
||||
private val naviPayAnalytics: NaviPayAnalytics.NaviPayDataInitAndSyncUseCase =
|
||||
@@ -51,6 +53,11 @@ constructor(
|
||||
processQuerySnapShotForBankUptime(
|
||||
bankUptimeQuerySnapShot = bankUptimeQuerySnapShot
|
||||
)
|
||||
naviPayAnalytics.onBankUptimeDataFetchSuccess(
|
||||
iteration = bankUptimePoller.getCurrentIteration(),
|
||||
naviPaySessionAttributes =
|
||||
naviPaySessionHelper.getNaviPaySessionAttributes(),
|
||||
)
|
||||
} catch (exception: Exception) {
|
||||
naviPayAnalytics.onErrorOccurredInProcessingQuerySnapshot(exception = exception)
|
||||
bankUptimePoller.stopPolling()
|
||||
|
||||
Reference in New Issue
Block a user