فهرست منبع

Fixes #11168: Honor RQ_DEFAULT_TIMEOUT config parameter when using Redis Sentinel

jeremystretch 3 سال پیش
والد
کامیت
68faab8196
2فایلهای تغییر یافته به همراه6 افزوده شده و 5 حذف شده
  1. 1 0
      docs/release-notes/version-3.3.md
  2. 5 5
      netbox/netbox/settings.py

+ 1 - 0
docs/release-notes/version-3.3.md

@@ -17,6 +17,7 @@
 * [#11101](https://github.com/netbox-community/netbox/issues/11101) - Correct circuits count under site view
 * [#11101](https://github.com/netbox-community/netbox/issues/11101) - Correct circuits count under site view
 * [#11128](https://github.com/netbox-community/netbox/issues/11128) - Disable ordering changelog table by object to avoid exception
 * [#11128](https://github.com/netbox-community/netbox/issues/11128) - Disable ordering changelog table by object to avoid exception
 * [#11142](https://github.com/netbox-community/netbox/issues/11142) - Correct available choices for status under IP range filter form
 * [#11142](https://github.com/netbox-community/netbox/issues/11142) - Correct available choices for status under IP range filter form
+* [#11168](https://github.com/netbox-community/netbox/issues/11168) - Honor `RQ_DEFAULT_TIMEOUT` config parameter when using Redis Sentinel
 
 
 ---
 ---
 
 

+ 5 - 5
netbox/netbox/settings.py

@@ -626,8 +626,6 @@ if TASKS_REDIS_USING_SENTINEL:
     RQ_PARAMS = {
     RQ_PARAMS = {
         'SENTINELS': TASKS_REDIS_SENTINELS,
         'SENTINELS': TASKS_REDIS_SENTINELS,
         'MASTER_NAME': TASKS_REDIS_SENTINEL_SERVICE,
         'MASTER_NAME': TASKS_REDIS_SENTINEL_SERVICE,
-        'DB': TASKS_REDIS_DATABASE,
-        'PASSWORD': TASKS_REDIS_PASSWORD,
         'SOCKET_TIMEOUT': None,
         'SOCKET_TIMEOUT': None,
         'CONNECTION_KWARGS': {
         'CONNECTION_KWARGS': {
             'socket_connect_timeout': TASKS_REDIS_SENTINEL_TIMEOUT
             'socket_connect_timeout': TASKS_REDIS_SENTINEL_TIMEOUT
@@ -637,12 +635,14 @@ else:
     RQ_PARAMS = {
     RQ_PARAMS = {
         'HOST': TASKS_REDIS_HOST,
         'HOST': TASKS_REDIS_HOST,
         'PORT': TASKS_REDIS_PORT,
         'PORT': TASKS_REDIS_PORT,
-        'DB': TASKS_REDIS_DATABASE,
-        'PASSWORD': TASKS_REDIS_PASSWORD,
         'SSL': TASKS_REDIS_SSL,
         'SSL': TASKS_REDIS_SSL,
         'SSL_CERT_REQS': None if TASKS_REDIS_SKIP_TLS_VERIFY else 'required',
         'SSL_CERT_REQS': None if TASKS_REDIS_SKIP_TLS_VERIFY else 'required',
-        'DEFAULT_TIMEOUT': RQ_DEFAULT_TIMEOUT,
     }
     }
+RQ_PARAMS.update({
+    'DB': TASKS_REDIS_DATABASE,
+    'PASSWORD': TASKS_REDIS_PASSWORD,
+    'DEFAULT_TIMEOUT': RQ_DEFAULT_TIMEOUT,
+})
 
 
 RQ_QUEUES = {
 RQ_QUEUES = {
     'high': RQ_PARAMS,
     'high': RQ_PARAMS,