Skip to content

Commit be084a2

Browse files
committed
[chores] Separated session redis bucket from cache bucket
1 parent 724ffb2 commit be084a2

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

tests/openwisp2/settings.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,11 +113,18 @@
113113
CACHES = {
114114
"default": {
115115
"BACKEND": "django_redis.cache.RedisCache",
116-
"LOCATION": "redis://localhost/5",
116+
"LOCATION": "redis://localhost/0",
117117
"OPTIONS": {
118118
"CLIENT_CLASS": "django_redis.client.DefaultClient",
119119
},
120-
}
120+
},
121+
"sessions": {
122+
"BACKEND": "django_redis.cache.RedisCache",
123+
"LOCATION": "redis://localhost/1",
124+
"OPTIONS": {
125+
"CLIENT_CLASS": "django_redis.client.DefaultClient",
126+
},
127+
},
121128
}
122129

123130
ASGI_APPLICATION = "openwisp2.asgi.application"
@@ -131,7 +138,7 @@
131138
"default": {
132139
"BACKEND": "channels_redis.core.RedisChannelLayer",
133140
"CONFIG": {
134-
"hosts": ["redis://localhost/7"],
141+
"hosts": ["redis://localhost/3"],
135142
"group_expiry": 3600,
136143
"capacity": 1000,
137144
"expiry": 30,
@@ -140,7 +147,7 @@
140147
}
141148

142149
SESSION_ENGINE = "django.contrib.sessions.backends.cache"
143-
SESSION_CACHE_ALIAS = "default"
150+
SESSION_CACHE_ALIAS = "sessions"
144151

145152
LOGGING = {
146153
"version": 1,
@@ -167,7 +174,7 @@
167174
LOGGING.update({"root": {"level": "INFO", "handlers": ["console"]}})
168175

169176
if not TESTING:
170-
CELERY_BROKER_URL = "redis://localhost/6"
177+
CELERY_BROKER_URL = "redis://localhost/2"
171178
else:
172179
CELERY_TASK_ALWAYS_EAGER = True
173180
CELERY_TASK_EAGER_PROPAGATES = True

0 commit comments

Comments
 (0)