Skip to content

Commit

Permalink
Fix detekt error
Browse files Browse the repository at this point in the history
  • Loading branch information
gino-m committed Dec 14, 2023
1 parent b535529 commit bbaf9b9
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,15 @@ constructor(

override suspend fun doWork(): Result = withContext(Dispatchers.IO) { doWorkInternal() }

private suspend fun doWorkInternal(): Result {
return try {
private suspend fun doWorkInternal(): Result =
try {
val mutations = getPendingOrEligibleFailedMutations()
Timber.d("Syncing ${mutations.size} changes for LOI $locationOfInterestId")
if (processMutations(mutations)) success() else retry()
} catch (t: Throwable) {
Timber.e(t, "Failed to sync changes for LOI $locationOfInterestId")
retry()
}
}

/**
* Attempts to fetch all mutations from the [MutationRepository] that are in `PENDING` state or in
Expand Down

0 comments on commit bbaf9b9

Please sign in to comment.