Skip to content

Commit

Permalink
bug-1907816: Allow using a Redis password.
Browse files Browse the repository at this point in the history
  • Loading branch information
smarnach committed Jul 15, 2024
1 parent 136300e commit 9e74534
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tecken/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,9 @@ def filter(self, record):
)

REDIS_URL = _config("REDIS_URL", doc="URL for Redis.")
REDIS_PASSWORD = (
_config("REDIS_PASSWORD", doc="Password for the Redis AUTH command.") or None
)
REDIS_SOCKET_CONNECT_TIMEOUT = 2
REDIS_SOCKET_TIMEOUT = 2

Expand All @@ -417,6 +420,7 @@ def filter(self, record):
"BACKEND": "django_redis.cache.RedisCache",
"LOCATION": REDIS_URL,
"OPTIONS": {
"PASSWORD": REDIS_PASSWORD,
"COMPRESSOR": "django_redis.compressors.zlib.ZlibCompressor",
"SERIALIZER": "django_redis.serializers.msgpack.MSGPackSerializer",
"SOCKET_CONNECT_TIMEOUT": REDIS_SOCKET_CONNECT_TIMEOUT,
Expand Down

0 comments on commit 9e74534

Please sign in to comment.