Explorar el Código

Set redis socket timeout to 5s

Ben Firshman hace 9 años
padre
commit
1a0b0c8b54
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      voting-app/app.py

+ 1 - 1
voting-app/app.py

@@ -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'])