mirror of
https://github.com/Wei-Shaw/claude-relay-service.git
synced 2026-01-22 16:40:25 +00:00
fix: 修复 ESLint curly 规则问题
- 在 if 语句后添加必需的大括号 - 修复 unifiedClaudeScheduler.js (1处) - 修复 unstableUpstreamHelper.js (2处)
This commit is contained in:
@@ -1182,7 +1182,9 @@ class UnifiedClaudeScheduler {
|
||||
const client = redis.getClientSafe()
|
||||
const key = `temp_unavailable:${accountType}:${accountId}`
|
||||
await client.setex(key, ttlSeconds, '1')
|
||||
if (sessionHash) await this._deleteSessionMapping(sessionHash)
|
||||
if (sessionHash) {
|
||||
await this._deleteSessionMapping(sessionHash)
|
||||
}
|
||||
logger.warn(
|
||||
`⏱️ Account ${accountId} (${accountType}) marked temporarily unavailable for ${ttlSeconds}s`
|
||||
)
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
const logger = require('./logger')
|
||||
|
||||
function parseList(envValue) {
|
||||
if (!envValue) return []
|
||||
if (!envValue) {
|
||||
return []
|
||||
}
|
||||
return envValue
|
||||
.split(',')
|
||||
.map((s) => s.trim().toLowerCase())
|
||||
@@ -13,7 +15,9 @@ const unstableKeywords = parseList(process.env.UNSTABLE_ERROR_KEYWORDS)
|
||||
const unstableStatusCodes = new Set([408, 499, 502, 503, 504, 522])
|
||||
|
||||
function normalizeErrorPayload(payload) {
|
||||
if (!payload) return {}
|
||||
if (!payload) {
|
||||
return {}
|
||||
}
|
||||
|
||||
if (typeof payload === 'string') {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user