forked from MarseyWorld/MarseyWorld
better syntax for redis host
parent
4c35f0b07f
commit
d500257729
|
@ -50,7 +50,7 @@ def before_request():
|
|||
g.nonce = secrets.token_urlsafe(31)
|
||||
|
||||
import redis
|
||||
host = environ.get("REDIS_URL", "redis://localhost").split('://')[1].split(':6379')[0]
|
||||
host = environ.get("REDIS_URL", "redis://localhost").split(':')[1]
|
||||
r = redis.Redis(host=host, port=6379, db=0)
|
||||
|
||||
@app.after_request
|
||||
|
|
Loading…
Reference in New Issue