TP-60060 | add success event in data upload (#10234)

This commit is contained in:
Abhinav Gupta
2024-03-28 10:55:22 +05:30
committed by GitHub
parent fedd7682b8
commit 8fb3b6fe41
2 changed files with 8 additions and 0 deletions

View File

@@ -116,6 +116,12 @@ class RetryableUserDataUploadWorker(val context: Context, workerParams: WorkerPa
userDataUploadWorkerConfig.workerType
)
if (syncApiResponse.isValidResponse()) {
sendEventTracker(
UserDataUploadWorkerUseCase.PL_GET_PRE_SIGNED_URL_SYNC_SUCCESS,
mapOf(
"workerType" to userDataUploadWorkerConfig.workerType
)
)
uploadDataToUrl(syncApiResponse.data, CoroutineScope(Dispatchers.IO)) {
handleAPIFailure(syncApiResponse.error ?: syncApiResponse.errors)
}

View File

@@ -207,6 +207,8 @@ class UserDataUploadWorkerUseCase @Inject constructor(@ApplicationContext val co
const val PL_DEV_USER_DATA_UPLOAD_FAILED = "PL_DEV_USER_DATA_UPLOAD_FAILED"
const val PL_ERROR_IN_GETTING_PRESIGNED_URL = "PL_ERROR_IN_GETTING_PRESIGNED_URL"
const val PL_ERROR_IN_GETTING_PRESIGNED_URL_SYNC = "PL_ERROR_IN_GETTING_PRESIGNED_URL_SYNC"
const val PL_GET_PRE_SIGNED_URL_SYNC_SUCCESS =
"PL_GET_PRE_SIGNED_URL_SYNC_SUCCESS"
const val on_data_upload_retry_count_finished =
"on_data_upload_retry_count_finished"
const val on_data_upload_retry_on_api_failure =