perf: update max_connections to use configurable setting in Redis configuration

This commit is contained in:
wangruidong 2025-04-22 15:51:59 +08:00
parent d7bc6bb201
commit 1aefa7a85f
2 changed files with 2 additions and 1 deletions

View File

@ -204,6 +204,7 @@ class Config(dict):
'REDIS_SSL_CERT': None,
'REDIS_SSL_CA': None,
'REDIS_SSL_REQUIRED': 'none',
'REDIS_MAX_CONNECTIONS': 100,
# Redis Sentinel
'REDIS_SENTINEL_HOSTS': '',
'REDIS_SENTINEL_PASSWORD': '',

View File

@ -364,7 +364,7 @@ REDIS_OPTIONS = {
"health_check_interval": 30
},
"CONNECTION_POOL_KWARGS": {
'max_connections': 100,
'max_connections': CONFIG.REDIS_MAX_CONNECTIONS,
}
}
if REDIS_USE_SSL: