markhopson commented on a change in pull request #14263:
URL: https://github.com/apache/airflow/pull/14263#discussion_r584223155



##########
File path: airflow/providers/amazon/aws/hooks/base_aws.py
##########
@@ -484,6 +509,34 @@ def expand_role(self, role: str) -> str:
         else:
             return 
self.get_client_type("iam").get_role(RoleName=role)["Role"]["Arn"]
 
+    @staticmethod
+    def retry(fun: Callable):
+        """
+        A decorator that provides a mechanism to repeat requests in response 
to exceeding a temporary quote
+        limit.
+        """
+
+        def decorator_f(self):
+            quota_retry = getattr(self, 'quota_retry', None)
+            if quota_retry is None:
+                return fun(self)
+            multiplier = quota_retry.get('multiplier', 1)
+            min_limit = quota_retry.get('min', 1)
+            max_limit = quota_retry.get('max', 1)
+            stop_after_delay = quota_retry.get('stop_after_delay', 10)
+            logger = quota_retry.get('logger')

Review comment:
       Hm I think think this was a mistake.  I believe I was testing something 
with this.  I will change this to use `self.logger` and not let user specify 
the logger in `quota_retry`.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to