Clarify the types for retry_interval args of wrap_db_retry

The retry_interval and max_retry_interval can be floats, and
inc_retry_interval is a bool.

This change has no functional impact.

Change-Id: I752c1dd7fe7e2a479b06ab96ad85be4e4a6f5b45
This commit is contained in:
Henry Gessau 2016-01-17 22:24:04 -05:00
parent 1e9bcbf17d
commit 15a05b33f1

@ -91,7 +91,7 @@ class wrap_db_retry(object):
Keyword arguments:
:param retry_interval: seconds between transaction retries
:type retry_interval: int
:type retry_interval: int or float
:param max_retries: max number of retries before an error is raised
:type max_retries: int
@ -100,13 +100,14 @@ class wrap_db_retry(object):
:type inc_retry_interval: bool
:param max_retry_interval: max interval value between retries
:type max_retry_interval: int
:type max_retry_interval: int or float
:param exception_checker: checks if an exception should trigger a retry
:type exception_checker: callable
"""
def __init__(self, retry_interval=0, max_retries=0, inc_retry_interval=0,
def __init__(self, retry_interval=0, max_retries=0,
inc_retry_interval=False,
max_retry_interval=0, retry_on_disconnect=False,
retry_on_deadlock=False, retry_on_request=False,
exception_checker=lambda exc: False):