Upgrading redis session.

This commit is contained in:
Samuel Clay 2020-06-22 12:23:35 -04:00
parent 4c6918f93e
commit 891551a592
2 changed files with 14 additions and 7 deletions

View file

@ -14,7 +14,7 @@ django-mailgun==0.9.1
django-oauth-toolkit==0.7.2
django-qurl==0.1.1
django-redis-cache==1.5.5
django-redis-sessions==0.5.6
django-redis-sessions==0.6.1
django-ses==0.7.1
django-subdomains==2.1.0
django-timezone-field==2.0

View file

@ -690,9 +690,16 @@ MONGOANALYTICSDB = connect(MONGO_ANALYTICS_DB.pop('name'), **MONGO_ANALYTICS_DB)
BROKER_BACKEND = "redis"
BROKER_URL = "redis://%s:6379/%s" % (REDIS['host'], CELERY_REDIS_DB_NUM)
CELERY_RESULT_BACKEND = BROKER_URL
SESSION_REDIS_HOST = REDIS_SESSIONS['host']
SESSION_REDIS_RETRY_ON_TIMEOUT = True
SESSION_REDIS_SOCKET_TIMEOUT = 10
SESSION_REDIS = {
'host': REDIS_SESSIONS['host'],
'port': 6379,
'db': SESSION_REDIS_DB,
# 'password': 'password',
'prefix': '',
'socket_timeout': 10,
'retry_on_timeout': True
}
CACHES = {
'default': {
@ -713,9 +720,9 @@ REDIS_FEED_UPDATE_POOL = redis.ConnectionPool(host=REDIS['host'], port=6379,
REDIS_STORY_HASH_TEMP_POOL = redis.ConnectionPool(host=REDIS['host'], port=6379, db=10)
# REDIS_CACHE_POOL = redis.ConnectionPool(host=REDIS['host'], port=6379, db=6) # Duped in CACHES
REDIS_STORY_HASH_POOL = redis.ConnectionPool(host=REDIS_STORY['host'], port=6379, db=1)
REDIS_FEED_READ_POOL = redis.ConnectionPool(host=SESSION_REDIS_HOST, port=6379, db=1)
REDIS_FEED_SUB_POOL = redis.ConnectionPool(host=SESSION_REDIS_HOST, port=6379, db=2)
REDIS_SESSION_POOL = redis.ConnectionPool(host=SESSION_REDIS_HOST, port=6379, db=5)
REDIS_FEED_READ_POOL = redis.ConnectionPool(host=REDIS_SESSIONS['host'], port=6379, db=1)
REDIS_FEED_SUB_POOL = redis.ConnectionPool(host=REDIS_SESSIONS['host'], port=6379, db=2)
REDIS_SESSION_POOL = redis.ConnectionPool(host=REDIS_SESSIONS['host'], port=6379, db=5)
REDIS_PUBSUB_POOL = redis.ConnectionPool(host=REDIS_PUBSUB['host'], port=6379, db=0)
# ==========