Skip to content

Commit 1bc1ab2

Browse files
committed
Preserve compatibility
1 parent bfa69dc commit 1bc1ab2

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

configuration/configuration.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,14 @@ def read_secret(secret_name):
5959
'DEFAULT_TIMEOUT': int(os.environ.get('REDIS_TIMEOUT', 300)),
6060
'SSL': os.environ.get('REDIS_SSL', 'False').lower() == 'true',
6161
},
62+
'webhooks': { # legacy setting, can be removed after Netbox seizes support for it
63+
'HOST': os.environ.get('REDIS_HOST', 'localhost'),
64+
'PORT': int(os.environ.get('REDIS_PORT', 6379)),
65+
'PASSWORD': os.environ.get('REDIS_PASSWORD', read_secret('redis_password')),
66+
'DATABASE': int(os.environ.get('REDIS_DATABASE', 0)),
67+
'DEFAULT_TIMEOUT': int(os.environ.get('REDIS_TIMEOUT', 300)),
68+
'SSL': os.environ.get('REDIS_SSL', 'False').lower() == 'true',
69+
},
6270
'caching': {
6371
'HOST': os.environ.get('REDIS_CACHE_HOST', os.environ.get('REDIS_HOST', 'localhost')),
6472
'PORT': int(os.environ.get('REDIS_CACHE_PORT', os.environ.get('REDIS_PORT', 6379))),

0 commit comments

Comments
 (0)