Moonfanz commited on
Commit
5375011
Β·
verified Β·
1 Parent(s): c102e42

Upload 2 files

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -365,11 +365,11 @@ def handle_api_error(error, attempt, current_api_key):
365
  else:
366
  delay = min(RETRY_DELAY * (2 ** attempt), MAX_RETRY_DELAY)
367
  logger.warning(
368
- f"{current_api_key[:8]} ... {current_api_key[-3:]} β†’ {status_code} ζœͺηŸ₯ι”™θ―― β†’ {delay} η§’εŽι‡θ―•..."
369
  )
370
  switch_api_key()
371
  time.sleep(delay)
372
- return 0, None
373
 
374
  elif isinstance(error, requests.exceptions.ConnectionError):
375
  delay = min(RETRY_DELAY * (2 ** attempt), MAX_RETRY_DELAY)
 
365
  else:
366
  delay = min(RETRY_DELAY * (2 ** attempt), MAX_RETRY_DELAY)
367
  logger.warning(
368
+ f"{current_api_key[:8]} ... {current_api_key[-3:]} β†’ {status_code} ζœͺηŸ₯ι”™θ――/ζ¨‘εž‹δΈε―η”¨ β†’ {delay} η§’εŽι‡θ―•..."
369
  )
370
  switch_api_key()
371
  time.sleep(delay)
372
+ return 2, None
373
 
374
  elif isinstance(error, requests.exceptions.ConnectionError):
375
  delay = min(RETRY_DELAY * (2 ** attempt), MAX_RETRY_DELAY)