Skip to content

Commit

Permalink
OpenConceptLab/ocl_issues#927 Redis clustering, fix Retry kombu error
Browse files Browse the repository at this point in the history
  • Loading branch information
rkorytkowski committed Aug 24, 2023
1 parent b2aacda commit 9d3e5b9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions core/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,6 @@
'socket_timeout': 5.0,
'socket_connect_timeout': 5.0,
'max_connections': 100,
'retry': Retry(ExponentialBackoff(cap=10, base=0.5), 10),
'retry_on_error': [ConnectionError],
'retry_on_timeout': True,
'health_check_interval': 0 # Handled by Redis TCP keepalive
}
Expand All @@ -331,7 +329,10 @@

# django cache
OPTIONS = {
'CONNECTION_POOL_KWARGS': REDIS_CONNECTION_OPTIONS
'CONNECTION_POOL_KWARGS': {
'retry': Retry(ExponentialBackoff(cap=10, base=0.5), 10),
'retry_on_error': [ConnectionError]
} | REDIS_CONNECTION_OPTIONS
}
if REDIS_SENTINELS:
DJANGO_REDIS_CONNECTION_FACTORY = 'django_redis.pool.SentinelConnectionFactory'
Expand Down

0 comments on commit 9d3e5b9

Please sign in to comment.