From 54dbe59c37b2d00c0f7b72e69b976bf825f7c7f6 Mon Sep 17 00:00:00 2001 From: Aryamanz29 Date: Thu, 26 Dec 2024 16:10:59 +0530 Subject: [PATCH] FT-842: Enabled the use of `Retry-After` header value for handling rate-limit retries --- pyatlan/client/atlan.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyatlan/client/atlan.py b/pyatlan/client/atlan.py index 52b8b3c69..53ba49649 100644 --- a/pyatlan/client/atlan.py +++ b/pyatlan/client/atlan.py @@ -112,6 +112,10 @@ def get_adapter() -> logging.LoggerAdapter: status_forcelist=[403, 429, 500, 502, 503, 504], allowed_methods=["HEAD", "GET", "OPTIONS", "POST", "PUT", "DELETE"], raise_on_status=False, + # When response.status is in `status_forcelist` + # and the "Retry-After" header is present, the retry mechanism + # will use the header's value to delay the next API call. + respect_retry_after_header=True, ) VERSION = read_text("pyatlan", "version.txt").strip()