diff options
author | Henry Gessau <gessau@gmail.com> | 2016-01-17 22:24:04 -0500 |
---|---|---|
committer | Henry Gessau <gessau@gmail.com> | 2016-02-18 22:48:46 -0500 |
commit | 15a05b33f19c95d515570828a7cb7d444df8713f (patch) | |
tree | 5157021f599207c9ef01cb66b62e7064acfd2a5d | |
parent | 1e9bcbf17d23cc602f0e3c4d31a1f7407907f0c6 (diff) | |
download | oslo-db-15a05b33f19c95d515570828a7cb7d444df8713f.tar.gz |
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
-rw-r--r-- | oslo_db/api.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/oslo_db/api.py b/oslo_db/api.py index ea1d41d..8cab3e5 100644 --- a/oslo_db/api.py +++ b/oslo_db/api.py @@ -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): |