diff options
author | Zuul <zuul@review.opendev.org> | 2022-08-19 00:42:56 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2022-08-19 00:42:56 +0000 |
commit | 3b30f155a7ed6e1f66ff6d0272c4216bee543b88 (patch) | |
tree | 059fc08ef96bdc581dc3f71c31cb199a57ad32a9 /swiftclient/service.py | |
parent | 7f2649bfb717f0f1cc077c04e206841581d6dab5 (diff) | |
parent | a1d2f31131d79d7c551dbac4fc1e9c4d177d2df5 (diff) | |
download | python-swiftclient-3b30f155a7ed6e1f66ff6d0272c4216bee543b88.tar.gz |
Merge "Enable retry_on_ratelimit by default"
Diffstat (limited to 'swiftclient/service.py')
-rw-r--r-- | swiftclient/service.py | 3 |
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'], |