Filippo Giunchedi has uploaded a new change for review. https://gerrit.wikimedia.org/r/254128
Change subject: deployment: add redis socket_connect_timeout ...................................................................... deployment: add redis socket_connect_timeout "backport" patch from https://github.com/trebuchet-deploy/trebuchet/pull/17 into our fork of trebuchet Bug: T118380 Change-Id: I34d3715eb347ecc9d878d4dcd4306d79bad42f42 --- M modules/deployment/files/modules/deploy.py M modules/deployment/files/returners/deploy_redis.py 2 files changed, 10 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/28/254128/1 diff --git a/modules/deployment/files/modules/deploy.py b/modules/deployment/files/modules/deploy.py index d12e3d8..2ff8149 100644 --- a/modules/deployment/files/modules/deploy.py +++ b/modules/deployment/files/modules/deploy.py @@ -20,9 +20,13 @@ ''' deployment_config = __pillar__.get('deployment_config') deploy_redis = deployment_config['redis'] + socket_connect_timeout = deploy_redis.get('socket_connect_timeout') + if socket_connect_timeout is not None: + socket_connect_timeout = int(socket_connect_timeout) serv = redis.Redis(host=deploy_redis['host'], port=int(deploy_redis['port']), - db=int(deploy_redis['db'])) + db=int(deploy_redis['db']), + socket_connect_timeout=socket_connect_timeout) return serv diff --git a/modules/deployment/files/returners/deploy_redis.py b/modules/deployment/files/returners/deploy_redis.py index 4e1e3d0..07de289 100644 --- a/modules/deployment/files/returners/deploy_redis.py +++ b/modules/deployment/files/returners/deploy_redis.py @@ -27,9 +27,13 @@ ''' deployment_config = __pillar__.get('deployment_config') deploy_redis = deployment_config['redis'] + socket_connect_timeout = deploy_redis.get('socket_connect_timeout') + if socket_connect_timeout is not None: + socket_connect_timeout = int(socket_connect_timeout) serv = redis.Redis(host=deploy_redis['host'], port=int(deploy_redis['port']), - db=int(deploy_redis['db'])) + db=int(deploy_redis['db']), + socket_connect_timeout=socket_connect_timeout) return serv -- To view, visit https://gerrit.wikimedia.org/r/254128 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I34d3715eb347ecc9d878d4dcd4306d79bad42f42 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Filippo Giunchedi <fgiunch...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits