style: fix gofmt formatting in cooldown files
Remove extra spaces in comment alignment to pass fmt-check CI.
This commit is contained in:
parent
8a6fb7d9e3
commit
0f5b2f67bb
2 changed files with 3 additions and 3 deletions
|
|
@ -196,8 +196,8 @@ func calculateStandardCooldown(errorCount int) time.Duration {
|
||||||
// 3 errors → 20 hours
|
// 3 errors → 20 hours
|
||||||
// 4+ errors → 24 hours (cap)
|
// 4+ errors → 24 hours (cap)
|
||||||
func calculateBillingCooldown(billingErrorCount int) time.Duration {
|
func calculateBillingCooldown(billingErrorCount int) time.Duration {
|
||||||
const baseMs = 5 * 60 * 60 * 1000 // 5 hours
|
const baseMs = 5 * 60 * 60 * 1000 // 5 hours
|
||||||
const maxMs = 24 * 60 * 60 * 1000 // 24 hours
|
const maxMs = 24 * 60 * 60 * 1000 // 24 hours
|
||||||
|
|
||||||
n := max(1, billingErrorCount)
|
n := max(1, billingErrorCount)
|
||||||
exp := min(n-1, 10)
|
exp := min(n-1, 10)
|
||||||
|
|
|
||||||
|
|
@ -184,7 +184,7 @@ func TestCooldown_BillingTakesPrecedence(t *testing.T) {
|
||||||
|
|
||||||
// Standard cooldown (1 min) + billing disable (5h)
|
// Standard cooldown (1 min) + billing disable (5h)
|
||||||
ct.MarkFailure("openai", FailoverRateLimit) // 1 min cooldown
|
ct.MarkFailure("openai", FailoverRateLimit) // 1 min cooldown
|
||||||
ct.MarkFailure("openai", FailoverBilling) // 5h disable
|
ct.MarkFailure("openai", FailoverBilling) // 5h disable
|
||||||
|
|
||||||
// After 2 min: standard cooldown expired but billing still active
|
// After 2 min: standard cooldown expired but billing still active
|
||||||
*current = now.Add(2 * time.Minute)
|
*current = now.Add(2 * time.Minute)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue