Decrease redis timeouts to within the WAMP message window

This ensures that if the builder sends a heartbeat, but redis is down, we don't time out the build while waiting to connect or receive. Since Redis data is ephemeral anyway, this should give us more stability in builds if/when redis is down
This commit is contained in:
Joseph Schorr 2017-10-05 16:29:09 -04:00 committed by Joseph Schorr
parent 32a473d23c
commit 2d34b89203

View file

@ -20,7 +20,7 @@ class RedisBuildLogs(object):
def __init__(self, redis_config):
args = dict(redis_config)
args.update({'socket_connect_timeout': 5, 'socket_timeout': 5})
args.update({'socket_connect_timeout': 1, 'socket_timeout': 2})
self._redis_config = redis_config
self._redis = redis.StrictRedis(**args)