You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 6a8fea3
Browse filesBrowse the repository at this point in the historyBrowse files
Kaushik Gopal
committed
feat: flush out example that retries with an exponential backoff strategy
Copy file name to clipboardExpand all lines: README.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -112,6 +112,11 @@ Say you have a network failure. A sensible strategy would be to NOT keep retryin
112
112
113
113
We simulate this behaviour using RxJava with the `retryWhen`
114
114
115
+
`RetryWithDelay` code snippet courtesy:
116
+
117
+
*http://stackoverflow.com/a/25292833/159825
118
+
* Another excellent implementation via @[sddamico](https://github.com/sddamico) : https://gist.github.com/sddamico/c45d7cdabc41e663bea1
119
+
115
120
#### "repeat" with exponential backoff
116
121
117
122
Another variant of the exponential backoff strategy is to execute an operation repeatedly for a given number of times, but with delayed intervals. So you execute a certain operation 1 second from now, then you execute it again 10 seconds from now, then you execute the operation 20 seconds from now. After a grand total of 3 times you stop executing.
0 commit comments