summaryrefslogtreecommitdiff
path: root/swiftclient/service.py
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2022-08-19 00:42:56 +0000
committerGerrit Code Review <review@openstack.org>2022-08-19 00:42:56 +0000
commit3b30f155a7ed6e1f66ff6d0272c4216bee543b88 (patch)
tree059fc08ef96bdc581dc3f71c31cb199a57ad32a9 /swiftclient/service.py
parent7f2649bfb717f0f1cc077c04e206841581d6dab5 (diff)
parenta1d2f31131d79d7c551dbac4fc1e9c4d177d2df5 (diff)
downloadpython-swiftclient-3b30f155a7ed6e1f66ff6d0272c4216bee543b88.tar.gz
Merge "Enable retry_on_ratelimit by default"
Diffstat (limited to 'swiftclient/service.py')
-rw-r--r--swiftclient/service.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/swiftclient/service.py b/swiftclient/service.py
index ed0f40a..440271b 100644
--- a/swiftclient/service.py
+++ b/swiftclient/service.py
@@ -155,6 +155,7 @@ def _build_default_global_options():
"user": environ.get('ST_USER'),
"key": environ.get('ST_KEY'),
"retries": 5,
+ "retry_on_ratelimit": True,
"force_auth_retry": False,
"os_username": environ.get('OS_USERNAME'),
"os_user_id": environ.get('OS_USER_ID'),
@@ -270,10 +271,12 @@ def get_conn(options):
"""
Return a connection building it from the options.
"""
+ options = dict(_default_global_options, **options)
return Connection(options['auth'],
options['user'],
options['key'],
timeout=options.get('timeout'),
+ retry_on_ratelimit=options['retry_on_ratelimit'],
retries=options['retries'],
auth_version=options['auth_version'],
os_options=options['os_options'],