v2, seems to work...

This commit is contained in:
Henry Oswald 2014-09-26 17:04:33 +01:00
parent f73629f8d9
commit 81307324fc
4 changed files with 18 additions and 15 deletions

View file

@ -13,15 +13,14 @@ LimitationsManager = require("../Subscription/LimitationsManager")
AuthorizationManager = require("../Security/AuthorizationManager")
EditorRealTimeController = require("./EditorRealTimeController")
TrackChangesManager = require("../TrackChanges/TrackChangesManager")
settings = require('settings-sharelatex')
Settings = require('settings-sharelatex')
slReqIdHelper = require('soa-req-id')
async = require('async')
ConnectedUsersManager = require("../ConnectedUsers/ConnectedUsersManager")
_ = require('underscore')
rclientPub = require("redis").createClient(settings.redis.web.port, settings.redis.web.host)
rclientPub.auth(settings.redis.web.password)
rclientSub = require("redis").createClient(settings.redis.web.port, settings.redis.web.host)
rclientSub.auth(settings.redis.web.password)
redis = require("redis-sharelatex")
rclientPub = redis.createClient(Settings.redis.web)
rclientSub = redis.createClient(Settings.redis.web)
module.exports = EditorController =
protocolVersion: 2

View file

@ -1,8 +1,7 @@
settings = require 'settings-sharelatex'
rclientPub = require("redis").createClient(settings.redis.web.port, settings.redis.web.host)
rclientPub.auth(settings.redis.web.password)
rclientSub = require("redis").createClient(settings.redis.web.port, settings.redis.web.host)
rclientSub.auth(settings.redis.web.password)
Settings = require 'settings-sharelatex'
redis = require("redis-sharelatex")
rclientPub = redis.createClient(Settings.redis.web)
rclientSub = redis.createClient(Settings.redis.web)
module.exports = EditorRealTimeController =
rclientPub: rclientPub

View file

@ -1,8 +1,8 @@
logger = require "logger-sharelatex"
metrics = require('../../infrastructure/Metrics')
Settings = require 'settings-sharelatex'
rclient = require("redis").createClient(Settings.redis.web.port, Settings.redis.web.host)
rclient.auth(Settings.redis.web.password)
redis = require("redis-sharelatex")
rclient = redis.createClient(Settings.redis.web)
DocumentUpdaterHandler = require('../DocumentUpdater/DocumentUpdaterHandler')
EditorRealTimeController = require("./EditorRealTimeController")

View file

@ -9,10 +9,15 @@ socketIoConfig = require('./SocketIoConfig')
soareqid = require('soa-req-id')
Router = require('../router')
metrics.inc("startup")
redis = require('redis')
RedisStore = require('connect-redis')(express)
SessionSockets = require('session.socket.io')
sessionStore = new RedisStore(host:Settings.redis.web.host, port:Settings.redis.web.port, pass:Settings.redis.web.password)
redis = require("redis-sharelatex")
rclient = redis.createClient(Settings.redis.web)
RedisStore = require('connect-redis')(express)
sessionStore = new RedisStore(client:rclient)
cookieParser = express.cookieParser(Settings.security.sessionSecret)
oneDayInMilliseconds = 86400000
ReferalConnect = require('../Features/Referal/ReferalConnect')