1
0
mirror of https://github.com/checktheroads/hyperglass synced 2024-05-11 05:55:08 +00:00

refactor redis config

This commit is contained in:
checktheroads
2020-01-28 09:52:54 -07:00
parent b5b7600880
commit 4a84c88db6
6 changed files with 58 additions and 40 deletions

View File

@@ -39,7 +39,7 @@ async def check_redis_instance():
{bool} -- True if Redis is running.
"""
try:
await check_redis(db=params.features.cache.redis_id, config=REDIS_CONFIG)
await check_redis(db=params.cache.database, config=REDIS_CONFIG)
except RuntimeError as e:
raise HyperglassError(str(e), level="danger") from None
@@ -71,7 +71,7 @@ async def build_ui():
async def clear_cache():
"""Clear the Redis cache on shutdown."""
try:
await clear_redis_cache(db=params.features.cache.redis_id, config=REDIS_CONFIG)
await clear_redis_cache(db=params.cache.database, config=REDIS_CONFIG)
except RuntimeError as e:
log.error(str(e))
pass