6818
}
6819
6821
>
// if a delay is specified by the application it should override the maximum interval set by the retry policy.
6822
>
delay := nextRetryDelayFrom(activityFailure)
6823
>
if delay != nil {
6824
retryMaxInterval = durationpb.New(*delay)
6825
}
6826
6828
>
retryBackoff, retryState := nextBackoffInterval(
6829
>
ms.timeSource.Now().In(time.UTC),
6830
>
ai.Attempt,
6831
>
ai.RetryMaximumAttempts,
6832
>
ai.RetryInitialInterval,
6833
>
retryMaxInterval,
6834
>
ai.RetryExpirationTime,
6835
>
ai.RetryBackoffCoefficient,
6836
>
backoff.MakeBackoffAlgorithm(delay),
6837
>
)
6838
>
if retryState != enumspb.RETRY_STATE_IN_PROGRESS {
6839
return retryState, nil
6840
}