mirror of
https://github.com/netbox-community/netbox.git
synced 2026-02-07 09:29:33 +01:00
Compare commits
4 Commits
20911-drop
...
21240-redi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a3be2b6d54 | ||
|
|
97847662ac | ||
|
|
c23b656c26 | ||
|
|
6062aa71b1 |
@@ -43,6 +43,16 @@ REDIS = {
|
||||
# 'INSECURE_SKIP_TLS_VERIFY': False,
|
||||
# Set a path to a certificate authority, typically used with a self signed certificate.
|
||||
# 'CA_CERT_PATH': '/etc/ssl/certs/ca.crt',
|
||||
# Advanced Redis client parameters (SSL/TLS, timeouts, etc.)
|
||||
# Passed directly to redis-py. See: https://redis-py.readthedocs.io/en/stable/connections.html
|
||||
# NOTE: The CA_CERT_PATH setting above is already mapped to 'ssl_ca_certs' in KWARGS.
|
||||
# Only override these parameters in KWARGS if you have a specific reason to do so.
|
||||
# 'KWARGS': {
|
||||
# 'ssl_certfile': '/path/to/client-cert.pem',
|
||||
# 'ssl_keyfile': '/path/to/client-key.pem',
|
||||
# 'ssl_min_version': ssl.TLSVersion.TLSv1_2,
|
||||
# 'ssl_ciphers': 'HIGH:!aNULL',
|
||||
# },
|
||||
},
|
||||
'caching': {
|
||||
'HOST': 'localhost',
|
||||
@@ -59,6 +69,17 @@ REDIS = {
|
||||
# 'INSECURE_SKIP_TLS_VERIFY': False,
|
||||
# Set a path to a certificate authority, typically used with a self signed certificate.
|
||||
# 'CA_CERT_PATH': '/etc/ssl/certs/ca.crt',
|
||||
# Advanced Redis client parameters (SSL/TLS, timeouts, etc.)
|
||||
# Passed directly to Redis connection pool. See: https://github.com/jazzband/django-redis#configure-as-cache-backend
|
||||
# NOTE: The INSECURE_SKIP_TLS_VERIFY setting above is already mapped to 'ssl_cert_reqs' and
|
||||
# CA_CERT_PATH is mapped to 'ssl_ca_certs' in KWARGS. Only override these parameters
|
||||
# in KWARGS if you have a specific reason to do so.
|
||||
# 'KWARGS': {
|
||||
# 'ssl_certfile': '/path/to/client-cert.pem',
|
||||
# 'ssl_keyfile': '/path/to/client-key.pem',
|
||||
# 'ssl_min_version': ssl.TLSVersion.TLSv1_2,
|
||||
# 'ssl_ciphers': 'HIGH:!aNULL',
|
||||
# },
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -408,6 +408,12 @@ if CACHING_REDIS_CA_CERT_PATH:
|
||||
CACHES['default']['OPTIONS'].setdefault('CONNECTION_POOL_KWARGS', {})
|
||||
CACHES['default']['OPTIONS']['CONNECTION_POOL_KWARGS']['ssl_ca_certs'] = CACHING_REDIS_CA_CERT_PATH
|
||||
|
||||
# Merge in KWARGS for additional parameters
|
||||
caching_redis_kwargs = REDIS['caching'].get('KWARGS')
|
||||
if caching_redis_kwargs:
|
||||
CACHES['default']['OPTIONS'].setdefault('CONNECTION_POOL_KWARGS', {})
|
||||
CACHES['default']['OPTIONS']['CONNECTION_POOL_KWARGS'].update(caching_redis_kwargs)
|
||||
|
||||
|
||||
#
|
||||
# Sessions
|
||||
@@ -817,6 +823,12 @@ if TASKS_REDIS_CA_CERT_PATH:
|
||||
RQ_PARAMS.setdefault('REDIS_CLIENT_KWARGS', {})
|
||||
RQ_PARAMS['REDIS_CLIENT_KWARGS']['ssl_ca_certs'] = TASKS_REDIS_CA_CERT_PATH
|
||||
|
||||
# Merge in KWARGS for additional parameters
|
||||
tasks_redis_kwargs = TASKS_REDIS.get('KWARGS')
|
||||
if tasks_redis_kwargs:
|
||||
RQ_PARAMS.setdefault('REDIS_CLIENT_KWARGS', {})
|
||||
RQ_PARAMS['REDIS_CLIENT_KWARGS'].update(tasks_redis_kwargs)
|
||||
|
||||
# Define named RQ queues
|
||||
RQ_QUEUES = {
|
||||
RQ_QUEUE_HIGH: RQ_PARAMS,
|
||||
|
||||
Reference in New Issue
Block a user