Skip to content

Commit

Permalink
fix: fixed BioSimulations API retry strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
jonrkarr committed Dec 23, 2021
1 parent 6f9551d commit e11f47e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion biosimulators_utils/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.1.151'
__version__ = '0.1.152'
4 changes: 2 additions & 2 deletions biosimulators_utils/biosimulations/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def get_authorization_for_client(id, secret, config=None):
return response_data['token_type'] + ' ' + response_data['access_token']


def get_api_session(num_retries=5, backoff_factor=10, config=None):
def get_api_session(num_retries=10, backoff_factor=0.25, config=None):
""" Get a session for the BioSimulations API with retrying
Args:
Expand All @@ -206,7 +206,7 @@ def get_api_session(num_retries=5, backoff_factor=10, config=None):
total=num_retries,
backoff_factor=backoff_factor,
allowed_methods=['GET', 'PUT', 'POST'],
status_forcelist=[500, 502, 503],
status_forcelist=[429, 500, 502, 503, 504],
)
adapter = HTTPAdapter(max_retries=retry_strategy)
session = requests.Session()
Expand Down

0 comments on commit e11f47e

Please sign in to comment.