소스 검색

Set redis socket timeout to 5s

Ben Firshman 9 년 전
부모
커밋
1a0b0c8b54
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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'])