agent/api/ecsclient/retry_handler.go
func (retrier *oneDayRetrier) RetryRules(r *request.Request) time.Duration {
	// This logic is the same as the default retrier, but duplicated here such
	// that upstream changes do not invalidate the math done above.
	if r.RetryCount <= submitStateChangeInitialRetries {
		delay := int(math.Pow(2, float64(r.RetryCount))) * (rand.Intn(30) + 30)
		return time.Duration(delay) * time.Millisecond
	}
	return 5 * time.Minute
}
func (retrier *oneDayRetrier) RetryRules(r *request.Request) time.Duration {
	// This logic is the same as the default retrier, but duplicated here such
	// that upstream changes do not invalidate the math done above.
	if r.RetryCount <= submitStateChangeInitialRetries {
		delay := int(math.Pow(2, float64(r.RetryCount))) * (rand.Intn(30) + 30)
		return time.Duration(delay) * time.Millisecond
	}
	return 5 * time.Minute
}
func ( retrier * oneDayRetrier ) RetryRules ( r * request . Request ) time . Duration { // This logic is the same as the default retrier, but duplicated here such // that upstream changes do not invalidate the math done above. if r . RetryCount <= submitStateChangeInitialRetries { delay := int ( math . Pow ( 2 , float64 ( r . RetryCount ) ) ) * ( rand . Intn ( 30 ) + 30 ) return time . Duration ( delay ) * time . Millisecond } return 5 * time . Minute }
// RetryRules returns the correct time to delay between retries for this
// instance of a retry. For the first 14 requests, it follows an exponential
// backoff between 30ms and 1 minute.
// See the const comments for math on how this gets us to around 24 hours
// total.
RetryRules returns the correct time to delay between retries for this instance of a retry . For the first 14 requests it follows an exponential backoff between 30ms and 1 minute . See the const comments for math on how this gets us to around 24 hours total .