Cuan
02/01/2021, 3:10 PMarrow.fx.coroutines.retry
the doc's say "The effect is executed once, and if it fails..."
How does it determine failure with the effect?
I've managed to achieve what I want with repeat
and schedule.doUntil { it.isRight() }
but it would make a little more sense to "retry a network request until is succeeds or fails 5 times" than to "repeat a network request until it succeeds or fails 5 times"stojan
02/01/2021, 3:17 PMrepeat
will repeat the effect if it succeeds
• the same schedule used with retry
will retry the effect in case of failureaballano
02/01/2021, 3:18 PMHow does it determine failure with the effect?I believe is handled by exceptions, so if the effect you run throws, then it’ll be retried
Cuan
02/01/2021, 3:37 PM