Set redis socket timeout to 5s
This commit is contained in:
parent
4d5ce4862e
commit
1a0b0c8b54
@ -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'])
|
||||
|
Loading…
Reference in New Issue
Block a user