mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-22 17:43:14 +00:00
Backoff automatic reconnect interval
Previously, offline nodes would be rechecked automatically on average every 45 seconds. Extend this to on average 180 seconds, to reduce ARP traffic significantly when there are a large volume of undefined nodes. The 'try to connect on open' behavior is retained, so this would mean a longer loss of connectivity only in a background monitored session.
This commit is contained in:
parent
96670784f9
commit
d9e47824a4
@ -221,7 +221,7 @@ class ConsoleHandler(object):
|
||||
self.connectstate = 'unconnected'
|
||||
self._send_rcpts({'connectstate': self.connectstate,
|
||||
'error': self.error})
|
||||
retrytime = 30 + (30 * random.random())
|
||||
retrytime = 120 + (120 * random.random())
|
||||
if not self.reconnect:
|
||||
self.reconnect = eventlet.spawn_after(retrytime, self._connect)
|
||||
return
|
||||
@ -230,7 +230,7 @@ class ConsoleHandler(object):
|
||||
self.connectstate = 'unconnected'
|
||||
self._send_rcpts({'connectstate': self.connectstate,
|
||||
'error': self.error})
|
||||
retrytime = 30 + (30 * random.random())
|
||||
retrytime = 120 + (120 * random.random())
|
||||
if not self.reconnect:
|
||||
self.reconnect = eventlet.spawn_after(retrytime, self._connect)
|
||||
return
|
||||
@ -241,7 +241,7 @@ class ConsoleHandler(object):
|
||||
self.connectstate = 'unconnected'
|
||||
self._send_rcpts({'connectstate': self.connectstate,
|
||||
'error': self.error})
|
||||
retrytime = 30 + (30 * random.random())
|
||||
retrytime = 120 + (120 * random.random())
|
||||
if not self.reconnect:
|
||||
self.reconnect = eventlet.spawn_after(retrytime, self._connect)
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user