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
Copy file name to clipboardExpand all lines: README.md
+6-4Lines changed: 6 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,8 +14,10 @@ Notes:
14
14
* This is a fork. You can find the original project [here](https://github.com/stechstudio/backoff).
15
15
* Now the codebase super strict, and it's covered with tests as much as possible. The original author is great, but the code was smelly :) It's sooo easy, and it took just one my evening... ;)
16
16
* I don't like wording "backoff" in the code. Yeah, it's fun but... I believe "retry" is more obvious. Sorry :)
17
-
* There is nothing wrong to use import instead of global namespace for function.
18
-
* At least my project has [aliases](./src/aliases.php) for backward compatibility with the original. ;)
17
+
* There is nothing wrong to use import instead of global namespace for function. Don't use old-school practices.
18
+
* Static variables with default values are deprecated and disabled. See dump of thoughts below.
19
+
* New methods `setJitterPercent|getJitterPercent`, `setJitterMinCap|getJitterMinCap` to have fine-tuning.
20
+
* My project has [aliases](./src/aliases.php) for backward compatibility with the original. ;)
19
21
20
22
21
23
## Installation
@@ -231,7 +233,7 @@ You can enable jitter by passing `true` in as the fifth argument to the `retry`
231
233
232
234
By default, we use the "FullJitter" approach outlined in the above article, where a random number between 0 and the sleep time provided by your selected strategy is used.
233
235
234
-
But you can change the maximum time for Jitter with method `setJitterPercent(). By defaultit's 100.
236
+
But you can change the maximum time for Jitter with method `setJitterPercent(). It's 100 by default. Also you can set min value for jitter with `setJitterMinCap` (it's `0` by default).
0 commit comments