Skip to content

Commit

Permalink
Merge pull request #570 from armosec/fixjira
Browse files Browse the repository at this point in the history
Increase default rate limit retries from 1 to 3 in backend API methods
  • Loading branch information
kooomix authored Jan 8, 2025
2 parents 7b13796 + 82728cd commit d9b6209
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions infrastructure/backend_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1975,7 +1975,7 @@ def post(self, url, **args):

def post_with_ratelimit(self, url, **args):
# Extract optional parameters with defaults
rate_limit_retries = args.pop("rate_limit_retries", 1)
rate_limit_retries = args.pop("rate_limit_retries", 3)
rate_limit_sleep = args.pop("rate_limit_sleep", 60)

for attempt in range(1, rate_limit_retries + 1):
Expand Down Expand Up @@ -2006,7 +2006,7 @@ def get(self, url, **args):
return requests.get(url, **args)

def get_with_rate_limit(self, url, **args):
rate_limit_retries = args.pop("rate_limit_retries", 1)
rate_limit_retries = args.pop("rate_limit_retries", 3)
rate_limit_sleep = args.pop("rate_limit_sleep", 60)

for attempt in range(1, rate_limit_retries + 1):
Expand Down

0 comments on commit d9b6209

Please sign in to comment.