package ordoschnellic import "time" const ( PushBatchLimit = 20 PushBatchTimeout = 25 * time.Second PushFinishTimeout = 3 * time.Second PushLeaseDuration = time.Minute PushFocusDelay = time.Minute PushRetention = 24 * time.Hour PushAttemptLimit = 5 ) // RetryAt preserves 2/4/8/16-minute backoff after attempts 1 through 4. // Exhausted or invalid attempts are terminal and cannot overflow a shift. func RetryAt(attempt int, now time.Time) (time.Time, bool) { if attempt < 1 || attempt >= PushAttemptLimit { return time.Time{}, false } return now.Add(time.Duration(1<= 200 && status < 300, Retry: status == 429 || status >= 500, Expired: status == 404 || status == 410, Attempted: true} }