diff options
author | Jenkins <jenkins@review.openstack.org> | 2017-02-05 12:49:41 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2017-02-05 12:49:41 +0000 |
commit | 7af28bf91b555b3d24282d3830218a5e10e16511 (patch) | |
tree | 7c9adc630ed783f2d081d412e1c97c27c4e4f998 | |
parent | b5cf0c58f24e8196a8f358f156df8aa8c094df6d (diff) | |
parent | 6f5f107e3f319bc417c3de4a1a17616fea9060ba (diff) | |
download | trove-7af28bf91b555b3d24282d3830218a5e10e16511.tar.gz |
Merge "backoff in poll_until"
-rw-r--r-- | trove/common/utils.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/trove/common/utils.py b/trove/common/utils.py index 52a3e7f8..d846b97b 100644 --- a/trove/common/utils.py +++ b/trove/common/utils.py @@ -199,8 +199,10 @@ def build_polling_task(retriever, condition=lambda value: value, if time_out is not None and time.time() - start_time > time_out: raise exception.PollTimeOut - return loopingcall.FixedIntervalLoopingCall( - f=poll_and_check).start(sleep_time, initial_delay=False) + return loopingcall.BackOffLoopingCall( + f=poll_and_check).start(initial_delay=False, + starting_interval=sleep_time, + max_interval=30, timeout=time_out) def poll_until(retriever, condition=lambda value: value, |