Switch to 2 Redis databases

Signed-off-by: Roberto Rosario <Roberto.Rosario@mayan-edms.com>
This commit is contained in:
Roberto Rosario
2019-07-02 21:40:12 -04:00
parent 924778d42f
commit f0ae0d06c7
2 changed files with 4 additions and 3 deletions

View File

@@ -57,8 +57,9 @@ apt-get update \
&& echo "maxmemory-policy allkeys-lru" >> /etc/redis/redis.conf \ && echo "maxmemory-policy allkeys-lru" >> /etc/redis/redis.conf \
# Disable saving the Redis database # Disable saving the Redis database
echo "save \"\"" >> /etc/redis/redis.conf \ echo "save \"\"" >> /etc/redis/redis.conf \
# Only provision 1 database # Only provision 2 database. One for the broker and the other for
&& echo "databases 1" >> /etc/redis/redis.conf # results
&& echo "databases 2" >> /etc/redis/redis.conf
#### ####

View File

@@ -108,7 +108,7 @@ class PlatformTemplate(object):
class PlatformTemplateSupervisord(PlatformTemplate): class PlatformTemplateSupervisord(PlatformTemplate):
context_defaults = { context_defaults = {
'BROKER_URL': 'redis://127.0.0.1:6379/0', 'BROKER_URL': 'redis://127.0.0.1:6379/0',
'CELERY_RESULT_BACKEND': 'redis://127.0.0.1:6379/0', 'CELERY_RESULT_BACKEND': 'redis://127.0.0.1:6379/1',
} }
label = _('Template for Supervisord.') label = _('Template for Supervisord.')
name = 'supervisord' name = 'supervisord'