Set redis socket timeout to 5s

This commit is contained in:
Ben Firshman 2016-06-17 19:56:11 -07:00
parent 4d5ce4862e
commit 1a0b0c8b54

View File

@ -13,7 +13,7 @@ app = Flask(__name__)
def get_redis():
if not hasattr(g, 'redis'):
g.redis = Redis(host="redis", db=0)
g.redis = Redis(host="redis", db=0, socket_timeout=5)
return g.redis
@app.route("/", methods=['POST','GET'])