Bump lower version of oslo.db to one that includes jitter argument

Change-Id: I2f85c495a47b740823e19c60a3ae3ac5762d0297
This commit is contained in:
Doug Wiegley 2019-02-16 20:36:08 -07:00
parent 3133add2c9
commit 77357d3ffe
No known key found for this signature in database
GPG Key ID: 4D3C112B76BBDB5F
3 changed files with 9 additions and 22 deletions

View File

@ -41,7 +41,7 @@ os-traits==0.9.0
oslo.concurrency==3.26.0
oslo.config==5.2.0
oslo.context==2.19.2
oslo.db==4.27.0
oslo.db==4.37.0
oslo.i18n==3.15.3
oslo.log==3.36.0
oslo.messaging==5.29.0

View File

@ -12,7 +12,6 @@
import contextlib
import copy
import inspect
import weakref
from oslo_concurrency import lockutils
@ -148,11 +147,6 @@ def _copy_if_lds(item):
return copy.deepcopy(item) if isinstance(item, (list, dict, set)) else item
# Do retries with some randomness in the backoff, if the version
# of oslo.db supports it.
# TODO(dougwig): remove this gross if/else when lower constraints
# on oslo.db is >= 4.37.0.
if 'jitter' in inspect.getargspec(oslo_db_api.wrap_db_retry.__init__).args:
_retry_db_errors = oslo_db_api.wrap_db_retry(
max_retries=MAX_RETRIES,
retry_interval=0.5,
@ -160,13 +154,6 @@ if 'jitter' in inspect.getargspec(oslo_db_api.wrap_db_retry.__init__).args:
exception_checker=is_retriable,
jitter=True
)
else:
_retry_db_errors = oslo_db_api.wrap_db_retry(
max_retries=MAX_RETRIES,
retry_interval=0.5,
inc_retry_interval=True,
exception_checker=is_retriable,
)
def retry_db_errors(f):

View File

@ -12,7 +12,7 @@ stevedore>=1.20.0 # Apache-2.0
oslo.concurrency>=3.26.0 # Apache-2.0
oslo.config>=5.2.0 # Apache-2.0
oslo.context>=2.19.2 # Apache-2.0
oslo.db>=4.27.0 # Apache-2.0
oslo.db>=4.37.0 # Apache-2.0
oslo.i18n>=3.15.3 # Apache-2.0
oslo.log>=3.36.0 # Apache-2.0
oslo.messaging>=5.29.0 # Apache-2.0