Skip to content

Commit fb4880f

Browse files
authored
fix: redis db (#3291)
1 parent 5e9a758 commit fb4880f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

apps/maxkb/conf.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,9 @@ def get_cache_setting(self):
6969
return {
7070
'default': {
7171
'BACKEND': 'django_redis.cache.RedisCache',
72-
'LOCATION': f'redis://{self.get("REDIS_HOST")}:{self.get("REDIS_PORT")}',
72+
'LOCATION': f'redis://{self.get("REDIS_HOST")}:{self.get("REDIS_PORT")}/{self.get("REDIS_DB")}',
7373
'OPTIONS': {
7474
'CLIENT_CLASS': 'django_redis.client.DefaultClient',
75-
"DB": self.get("REDIS_DB"),
7675
"PASSWORD": self.get("REDIS_PASSWORD"),
7776
"CONNECTION_POOL_KWARGS": {"max_connections": int(self.get("REDIS_MAX_CONNECTIONS"))}
7877
},

0 commit comments

Comments
 (0)