Unverified Commit a07ec354 authored by Filipe de Lima Brito's avatar Filipe de Lima Brito Committed by GitHub

Merge pull request #1946 from RocketChat/fix/increase-db-retry

[FIX] Increase db retries
parents 9063d0b0 ca672eea
...@@ -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