Skip to content

Commit 2ba840c

Browse files
Merge pull request #7200 from pierrechev/develop
Enable the alternate connection factory for Redis Sentinel
2 parents 46cd551 + 312246f commit 2ba840c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

netbox/netbox/settings.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ def _setting(name, default=None):
250250
}
251251
}
252252
if CACHING_REDIS_SENTINELS:
253+
DJANGO_REDIS_CONNECTION_FACTORY = 'django_redis.pool.SentinelConnectionFactory'
253254
CACHES['default']['LOCATION'] = f'{CACHING_REDIS_PROTO}://{CACHING_REDIS_SENTINEL_SERVICE}/{CACHING_REDIS_DATABASE}'
254255
CACHES['default']['OPTIONS']['CLIENT_CLASS'] = 'django_redis.client.SentinelClient'
255256
CACHES['default']['OPTIONS']['SENTINELS'] = CACHING_REDIS_SENTINELS

0 commit comments

Comments
 (0)