add maxRestarts to RestartWithBackoff #24129
This commit is contained in:
parent
32987c8704
commit
e4dd3c24fc
6 changed files with 393 additions and 22 deletions
|
|
@ -37,7 +37,8 @@ class RestartDocSpec extends AkkaSpec with CompileOnlySpec {
|
|||
val restartSource = RestartSource.withBackoff(
|
||||
minBackoff = 3.seconds,
|
||||
maxBackoff = 30.seconds,
|
||||
randomFactor = 0.2 // adds 20% "noise" to vary the intervals slightly
|
||||
randomFactor = 0.2, // adds 20% "noise" to vary the intervals slightly
|
||||
maxRestarts = 20 // limits the amount of restarts to 20
|
||||
) { () ⇒
|
||||
// Create a source from a future of a source
|
||||
Source.fromFutureSource {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue