Fixed SENTINEL docs

This commit is contained in:
Selwin Ong 2021-08-21 17:09:31 +07:00
parent f9ddf7dca5
commit 1352465ad1
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ def get_redis_from_config(settings, connection_class=Redis):
"""Returns a StrictRedis instance from a dictionary of settings. """Returns a StrictRedis instance from a dictionary of settings.
To use redis sentinel, you must specify a dictionary in the configuration file. To use redis sentinel, you must specify a dictionary in the configuration file.
Example of a dictionary with keys without values: Example of a dictionary with keys without values:
SENTINEL: {'INSTANCES':, 'SOCKET_TIMEOUT':, 'PASSWORD':,'DB':, 'MASTER_NAME':} SENTINEL = {'INSTANCES':, 'SOCKET_TIMEOUT':, 'PASSWORD':,'DB':, 'MASTER_NAME':}
""" """
if settings.get('REDIS_URL') is not None: if settings.get('REDIS_URL') is not None:
return connection_class.from_url(settings['REDIS_URL']) return connection_class.from_url(settings['REDIS_URL'])