Commit 0e4c9cee authored by Lucio Maciel's avatar Lucio Maciel

Increase db retries

parent 61318332
...@@ -9,7 +9,7 @@ import timber.log.Timber ...@@ -9,7 +9,7 @@ import timber.log.Timber
import kotlin.coroutines.experimental.coroutineContext import kotlin.coroutines.experimental.coroutineContext
const val DEFAULT_RETRY = 3 const val DEFAULT_RETRY = 3
private const val DEFAULT_DB_RETRY = 5 private const val DEFAULT_DB_RETRY = 15
suspend fun <T> retryIO( suspend fun <T> retryIO(
description: String = "<missing description>", description: String = "<missing description>",
...@@ -42,7 +42,7 @@ suspend fun <T> retryDB( ...@@ -42,7 +42,7 @@ suspend fun <T> retryDB(
description: String = "<missing description>", description: String = "<missing description>",
times: Int = DEFAULT_DB_RETRY, times: Int = DEFAULT_DB_RETRY,
initialDelay: Long = 100, // 0.1 second initialDelay: Long = 100, // 0.1 second
maxDelay: Long = 500, // 0.5 second maxDelay: Long = 1500, // 1.5 second
factor: Double = 1.2, factor: Double = 1.2,
block: suspend () -> T): T block: suspend () -> T): T
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment