move pubsub traffic over to a pubsub redis connection string

This commit is contained in:
Henry Oswald 2019-07-03 09:55:16 +01:00
parent 670ce61da1
commit 8042a415ec
3 changed files with 9 additions and 3 deletions

View file

@ -1,7 +1,7 @@
logger = require "logger-sharelatex"
settings = require 'settings-sharelatex'
redis = require("redis-sharelatex")
rclient = redis.createClient(settings.redis.documentupdater)
rclient = redis.createClient(settings.redis.pubsub)
SafeJsonParse = require "./SafeJsonParse"
EventLogger = require "./EventLogger"
HealthCheckManager = require "./HealthCheckManager"

View file

@ -2,8 +2,8 @@ Settings = require 'settings-sharelatex'
logger = require 'logger-sharelatex'
redis = require("redis-sharelatex")
SafeJsonParse = require "./SafeJsonParse"
rclientPub = redis.createClient(Settings.redis.realtime)
rclientSub = redis.createClient(Settings.redis.realtime)
rclientPub = redis.createClient(Settings.redis.pubsub)
rclientSub = redis.createClient(Settings.redis.pubsub)
EventLogger = require "./EventLogger"
HealthCheckManager = require "./HealthCheckManager"

View file

@ -1,5 +1,11 @@
settings =
redis:
pubsub:
host: process.env['PUBSUB_REDIS_HOST'] or process.env['REDIS_HOST'] or "localhost"
port: process.env['PUBSUB_REDIS_PORT'] or process.env['REDIS_PORT'] or "6379"
password: process.env["PUBSUB_REDIS_PASSWORD"] or process.env["REDIS_PASSWORD"] or ""
realtime:
host: process.env['REAL_TIME_REDIS_HOST'] or process.env['REDIS_HOST'] or "localhost"
port: process.env['REAL_TIME_REDIS_PORT'] or process.env['REDIS_PORT'] or "6379"