Skip to content

Commit

Permalink
chore: Use public api for exp backoff delay (#1268)
Browse files Browse the repository at this point in the history
  • Loading branch information
patriknw authored Jan 28, 2025
1 parent d33f9df commit 62f81cc
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import scala.jdk.CollectionConverters._

import akka.actor.typed.ActorSystem
import akka.annotation.InternalApi
import akka.pattern.BackoffSupervisor
import akka.pattern.RetrySupport
import akka.pattern.after
import org.slf4j.Logger
import org.slf4j.LoggerFactory
Expand Down Expand Up @@ -59,7 +59,7 @@ object Requests {
Future.failed(failOnMaxRetries(response))
} else { // retry after exponential backoff
val nextRetry = retries + 1
val delay = BackoffSupervisor.calculateDelay(retries, minBackoff, maxBackoff, randomFactor)
val delay = RetrySupport.calculateExponentialBackoffDelay(retries, minBackoff, maxBackoff, randomFactor)
onRetry(response, nextRetry, delay)
after(delay) {
retry(
Expand Down

0 comments on commit 62f81cc

Please sign in to comment.