Merge "Use tenacity instead of retrying"

This commit is contained in:
Jenkins 2017-02-08 13:56:57 +00:00 committed by Gerrit Code Review
commit 99a76263c4
2 changed files with 6 additions and 4 deletions

View File

@ -21,7 +21,7 @@ import time
from oslo_config import cfg
from oslo_log import log
import retrying
import tenacity
import tooz.coordination
from designate.utils import generate_uuid
@ -153,8 +153,10 @@ class Partitioner(object):
'the only worker. Please configure a coordination '
'backend'))
@retrying.retry(stop_max_attempt_number=5, wait_random_max=2000,
retry_on_exception=_retry_if_tooz_error)
@tenacity.retry(stop=tenacity.stop_after_attempt(5),
wait=tenacity.wait_random(max=2),
retry=tenacity.retry_if_exception(_retry_if_tooz_error),
reraise=True)
def _get_members(self, group_id):
get_members_req = self._coordinator.get_members(group_id)
try:

View File

@ -28,7 +28,7 @@ pecan!=1.0.2,!=1.0.3,!=1.0.4,!=1.2,>=1.0.0 # BSD
python-designateclient>=1.5.0 # Apache-2.0
python-neutronclient>=5.1.0 # Apache-2.0
requests!=2.12.2,>=2.10.0 # Apache-2.0
retrying!=1.3.0,>=1.2.3 # Apache-2.0
tenacity>=3.2.1 # Apache-2.0
six>=1.9.0 # MIT
SQLAlchemy<1.1.0,>=1.0.10 # MIT
sqlalchemy-migrate>=0.9.6 # Apache-2.0