fix: redis db (#3291)
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run

This commit is contained in:
shaohuzhang1 2025-06-18 12:24:26 +08:00 committed by GitHub
parent 5e9a7583a3
commit fb4880f3f4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -69,10 +69,9 @@ class Config(dict):
return {
'default': {
'BACKEND': 'django_redis.cache.RedisCache',
'LOCATION': f'redis://{self.get("REDIS_HOST")}:{self.get("REDIS_PORT")}',
'LOCATION': f'redis://{self.get("REDIS_HOST")}:{self.get("REDIS_PORT")}/{self.get("REDIS_DB")}',
'OPTIONS': {
'CLIENT_CLASS': 'django_redis.client.DefaultClient',
"DB": self.get("REDIS_DB"),
"PASSWORD": self.get("REDIS_PASSWORD"),
"CONNECTION_POOL_KWARGS": {"max_connections": int(self.get("REDIS_MAX_CONNECTIONS"))}
},