-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
I'm not sure why but I'm getting an extra call to my promise
Looks like the retry is occurring correctly since logged "Retrying request" matches my retry attempt.
The last attempt is the one that looks extraneous. Would you be able to advise why?
Therefore if I use Directly(1) I'm seeting my request sent 3 times instead of 2.
def sendWithRetry[U](promise: => Future[U], retryPolicy: retry.Policy): Future[U] = {
val retryOnSpecifiedFailurePolicy = retry.When {
case CustomException() =>
logger.warn("Retrying request...")
retryPolicy
}
retryOnSpecifiedFailurePolicy(promise)
}
I'm calling the above like this
sendWithRetry(send(message), retry.Directly(1))
and I have this defined in class scope
implicit val always: retry.Success[Any] = retry.Success.always
nylonee, daandi, clocklear, amdelamar, nebtrx and 6 more
Metadata
Metadata
Assignees
Labels
No labels