respect custom redis uri

enable usage of app.config["REDIS_URI"]
This commit is contained in:
rubikscuber
2022-03-10 11:28:03 +01:00
committed by GitHub
parent 38bf10d3d2
commit cdd237b5f9
+2 -1
View File
@@ -228,8 +228,9 @@ class RedisSessionInterface(SessionInterface):
"""
if self.backend is None:
import aioredis
uri = app.config["REDIS_URI"] if "REDIS_URI" in app.config else "redis://localhost"
self.backend = await aioredis.from_url(
"redis://localhost", encoding="utf-8", decode_responses=True
uri, encoding="utf-8", decode_responses=True
)
async def get(self, key: str, app: Quart = None):