retryOnDbException

fun <T> retryOnDbException(count: Int, sleep: Int = 10, fn: () -> T): T

Retries if the exception is any transient DB access throw, but if the problem is unsolvable (typically DB closed), then throw immediately