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") AuthorizationManager = require("../Security/AuthorizationManager")
EditorRealTimeController = require("./EditorRealTimeController") EditorRealTimeController = require("./EditorRealTimeController")
TrackChangesManager = require("../TrackChanges/TrackChangesManager") TrackChangesManager = require("../TrackChanges/TrackChangesManager")
settings = require('settings-sharelatex') Settings = require('settings-sharelatex')
slReqIdHelper = require('soa-req-id') slReqIdHelper = require('soa-req-id')
async = require('async') async = require('async')
ConnectedUsersManager = require("../ConnectedUsers/ConnectedUsersManager") ConnectedUsersManager = require("../ConnectedUsers/ConnectedUsersManager")
_ = require('underscore') _ = require('underscore')
rclientPub = require("redis").createClient(settings.redis.web.port, settings.redis.web.host) redis = require("redis-sharelatex")
rclientPub.auth(settings.redis.web.password) rclientPub = redis.createClient(Settings.redis.web)
rclientSub = require("redis").createClient(settings.redis.web.port, settings.redis.web.host) rclientSub = redis.createClient(Settings.redis.web)
rclientSub.auth(settings.redis.web.password)
module.exports = EditorController = module.exports = EditorController =
protocolVersion: 2 protocolVersion: 2

View file

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

View file

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

View file

@ -9,10 +9,15 @@ socketIoConfig = require('./SocketIoConfig')
soareqid = require('soa-req-id') soareqid = require('soa-req-id')
Router = require('../router') Router = require('../router')
metrics.inc("startup") metrics.inc("startup")
redis = require('redis')
RedisStore = require('connect-redis')(express)
SessionSockets = require('session.socket.io') 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) cookieParser = express.cookieParser(Settings.security.sessionSecret)
oneDayInMilliseconds = 86400000 oneDayInMilliseconds = 86400000
ReferalConnect = require('../Features/Referal/ReferalConnect') ReferalConnect = require('../Features/Referal/ReferalConnect')