Commit d43af8f6 authored by Sebastien Robin's avatar Sebastien Robin

task distribution: make services much more reactive when server is back

parent 79ab9c59
...@@ -114,7 +114,10 @@ class RPCRetry(object): ...@@ -114,7 +114,10 @@ class RPCRetry(object):
self._logger.warning('Got exception, retrying: %s%r ' self._logger.warning('Got exception, retrying: %s%r '
'in %is', func_id, tuple(args), retry_time, exc_info=1) 'in %is', func_id, tuple(args), retry_time, exc_info=1)
time.sleep(retry_time) time.sleep(retry_time)
retry_time *= 1.5 # find a balance between not overloading a server and
# getting back working services quickly when rpc calls should
# rework (do not wait 2 days if server is back)
retry_time = min(retry_time * 1.5, self._retry_time * 10)
class TestResultLineProxy(RPCRetry): class TestResultLineProxy(RPCRetry):
""" """
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment