Skip to content

Commit 1a0b0c8

Browse files
committed
Set redis socket timeout to 5s
1 parent 4d5ce48 commit 1a0b0c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

voting-app/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
def get_redis():
1515
if not hasattr(g, 'redis'):
16-
g.redis = Redis(host="redis", db=0)
16+
g.redis = Redis(host="redis", db=0, socket_timeout=5)
1717
return g.redis
1818

1919
@app.route("/", methods=['POST','GET'])

0 commit comments

Comments
 (0)