roll back changes for redis port because the initial change didn't work. Will figure out what needs to be done differently

This commit is contained in:
Jonathan Math 2020-10-25 12:14:34 +07:00
parent cc72ae588e
commit 8b9d92b827
5 changed files with 10 additions and 15 deletions

View file

@ -67,7 +67,7 @@ services:
redis:
image: redis:3
ports:
- '6579:6579'
- '6379:6379'
container_name: redis
volumes:
- ./docker/volumes/redis:/data

View file

@ -33,7 +33,7 @@ ENFORCE_SIGNUP_CAPTCHA = False
CACHES = {
'default': {
'BACKEND': 'redis_cache.RedisCache',
'LOCATION': 'redis:6579',
'LOCATION': 'redis:6379',
'OPTIONS': {
'DB': 6,
'PARSER_CLASS': 'redis.connection.HiredisParser'
@ -99,7 +99,7 @@ MONGODB_SLAVE = {
}
# Celery RabbitMQ/Redis Broker
BROKER_URL = "redis://redis:6579/0"
BROKER_URL = "redis://redis:6379/0"
CELERY_RESULT_BACKEND = BROKER_URL
REDIS = {
@ -113,7 +113,7 @@ REDIS_STORY = {
}
REDIS_SESSIONS = {
'host': 'redis',
'port': 6579
'port': 6379
}
CELERY_REDIS_DB_NUM = 4

View file

@ -578,10 +578,8 @@ S3_AVATARS_BUCKET_NAME = 'avatars.newsblur.com'
# ==================
if os.getenv("DOCKERBUILD"):
from newsblur_web.docker_local_settings import *
REDIS_PORT = 6579
else:
from newsblur_web.local_settings import *
REDIS_PORT = 6379
if not DEBUG:
INSTALLED_APPS += (
@ -681,15 +679,15 @@ MONGOANALYTICSDB = connect(MONGO_ANALYTICS_DB_NAME, **MONGO_ANALYTICS_DB)
# =========
# = Redis =
# =========
REDIS_PORT = 6379
CELERY_REDIS_DB_NUM = 4
SESSION_REDIS_DB = 5
CELERY_BROKER_URL = "redis://%s:%s/%s" % (REDIS['host'], REDIS_PORT,CELERY_REDIS_DB_NUM)
CELERY_BROKER_URL = "redis://%s:6379/%s" % (REDIS['host'],CELERY_REDIS_DB_NUM)
CELERY_RESULT_BACKEND = CELERY_BROKER_URL
SESSION_REDIS = {
'host': REDIS_SESSIONS['host'],
'port': REDIS_PORT,
'port': 6379,
'db': SESSION_REDIS_DB,
# 'password': 'password',
'prefix': '',
@ -700,7 +698,7 @@ SESSION_REDIS = {
CACHES = {
'default': {
'BACKEND': 'redis_cache.RedisCache',
'LOCATION': '%s:%s' % REDIS['host'], REDIS_PORT,
'LOCATION': '%s:6379' % REDIS['host'],
'OPTIONS': {
'DB': 6,
'PARSER_CLASS': 'redis.connection.HiredisParser',

View file

@ -5,7 +5,6 @@ log = require './log.js'
DEV = process.env.NODE_ENV == 'development'
DOCKER = process.env.NODE_ENV == 'docker'
REDIS_SERVER = if process.env.NODE_ENV == 'development' then 'localhost' else if DOCKER then 'redis' else 'db_redis_pubsub'
REDIS_PORT = process.env.env.NODE_ENV == 'docker' then 6579 else 6379
SECURE = !!process.env.NODE_SSL
# client = redis.createClient 6379, REDIS_SERVER
@ -66,7 +65,7 @@ io.on 'connection', (socket) ->
socket.on "error", (err) ->
log.debug "Error (socket): #{err}"
socket.subscribe?.quit()
socket.subscribe = redis.createClient REDIS_PORT, REDIS_SERVER
socket.subscribe = redis.createClient 6379, REDIS_SERVER
socket.subscribe.on "error", (err) =>
log.info @username, "Error: #{err} (#{@feeds.length} feeds)"
socket.subscribe?.quit()

View file

@ -14,8 +14,6 @@
REDIS_SERVER = process.env.NODE_ENV === 'development' ? 'localhost' : DOCKER ? 'redis' : 'db_redis_pubsub';
REDIS_PORT = process.env.NODE_ENV === 'docker' ? 6379 : 6579;
SECURE = !!process.env.NODE_SSL;
log.debug("Starting NewsBlur unread count server...");
@ -72,7 +70,7 @@
if ((_ref = socket.subscribe) != null) {
_ref.quit();
}
socket.subscribe = redis.createClient(REDIS_PORT, REDIS_SERVER);
socket.subscribe = redis.createClient(6379, REDIS_SERVER);
socket.subscribe.on("error", (function(_this) {
return function(err) {
var _ref1;