Skip to content

Commit 052796e

Browse files
Merge branch '172-retry-only-429' into staging
2 parents 5be1748 + b292e67 commit 052796e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cortexapps_cli/cortex_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def __init__(self, api_key, tenant, numeric_level, base_url='https://api.getcort
9898
max_retries=Retry(
9999
total=3,
100100
backoff_factor=0.3,
101-
status_forcelist=[500, 502, 503, 504], # Removed 429 - we avoid it with rate limiting
101+
status_forcelist=[429], # Only retry on rate limit errors
102102
allowed_methods=["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"],
103103
respect_retry_after_header=True
104104
)

0 commit comments

Comments
 (0)