style(usage): prettier line-wrap for claude-usage 429 backoff

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Codex
2026-06-20 20:56:16 +09:00
parent 2be6c8db8d
commit 2612e8a6ca

View File

@@ -206,7 +206,10 @@ async function fetchUsageForToken(
* apply to *failures* too — without it an empty cache means every dashboard
* refresh hits the API, which itself sustains the very 429s we then report.
*/
const recordAttempt = (errorStatus?: number, cooldownUntil?: number): void => {
const recordAttempt = (
errorStatus?: number,
cooldownUntil?: number,
): void => {
const now = Date.now();
const entry: UsageCacheEntry = usageDiskCache[writeKey] ?? {
usage: {},
@@ -308,7 +311,8 @@ async function fetchUsageForToken(
tokenKey: legacyTokenCacheKey(token),
cacheKey: writeKey,
staleMinutes: Math.round(staleMs / 60_000),
retryAfterSec: retryAfterMs != null ? Math.round(retryAfterMs / 1000) : null,
retryAfterSec:
retryAfterMs != null ? Math.round(retryAfterMs / 1000) : null,
cooldownSec: Math.round(cooldownMs / 1000),
},
'Claude usage API: rate limited (429)',