diff options
author | 2020-11-16 16:18:21 +0200 | |
---|---|---|
committer | 2020-11-16 16:18:21 +0200 | |
commit | a1fc1ad5643f4ae5f5ebbb3cb8f8cdc0a34df95a (patch) | |
tree | ae6bc97be0a0d8a1a4cf4416e58649ab8bbf0a23 | |
parent | Add Redis service to docker-compose.yml (diff) |
Create Redis configuration class
-rw-r--r-- | bot/constants.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/bot/constants.py b/bot/constants.py index f1f34886..1dcc8846 100644 --- a/bot/constants.py +++ b/bot/constants.py @@ -216,6 +216,13 @@ class Wolfram(NamedTuple): key = environ.get("WOLFRAM_API_KEY") +class RedisCache(NamedTuple): + host = environ.get("REDIS_HOST", "redis.default.svc.cluster.local") + port = environ.get("REDIS_PORT", 6379) + password = environ.get("REDIS_PASSWORD") + use_fakeredis = environ.get("USE_FAKEREDIS", "false").lower() == "true" + + # Default role combinations MODERATION_ROLES = Roles.moderator, Roles.admin, Roles.owner STAFF_ROLES = Roles.helpers, Roles.moderator, Roles.admin, Roles.owner |