mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
moved back to not include sentinal while we upgrade to 0.10.x node
This commit is contained in:
parent
fd6c2b5616
commit
9c85e9b848
24 changed files with 40 additions and 31 deletions
|
@ -7,11 +7,13 @@ RedisManager = require('./app/js/RedisManager')
|
|||
UpdateManager = require('./app/js/UpdateManager')
|
||||
DispatchManager = require('./app/js/DispatchManager')
|
||||
Keys = require('./app/js/RedisKeyBuilder')
|
||||
redis = require('redis')
|
||||
Errors = require "./app/js/Errors"
|
||||
HttpController = require "./app/js/HttpController"
|
||||
|
||||
redis = require("redis-sharelatex")
|
||||
rclient = redis.createClient(Settings.redis.web)
|
||||
redisConf = Settings.redis.web
|
||||
rclient = redis.createClient(redisConf.port, redisConf.host)
|
||||
rclient.auth(redisConf.password)
|
||||
|
||||
Path = require "path"
|
||||
Metrics = require "metrics-sharelatex"
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
Settings = require('settings-sharelatex')
|
||||
logger = require('logger-sharelatex')
|
||||
Keys = require('./RedisKeyBuilder')
|
||||
redis = require('redis')
|
||||
UpdateManager = require('./UpdateManager')
|
||||
Metrics = require('./Metrics')
|
||||
redis = require("redis-sharelatex")
|
||||
|
||||
module.exports = DispatchManager =
|
||||
createDispatcher: () ->
|
||||
client = redis.createClient(Settings.redis.web)
|
||||
|
||||
redisConf = Settings.redis.web
|
||||
client = redis.createClient(redisConf.port, redisConf.host)
|
||||
client.auth(redisConf.password)
|
||||
|
||||
worker = {
|
||||
client: client
|
||||
_waitForUpdateThenDispatchWorker: (callback = (error) ->) ->
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
metrics = require('./Metrics')
|
||||
Settings = require('settings-sharelatex')
|
||||
redis = require("redis-sharelatex")
|
||||
rclient = redis.createClient(Settings.redis.web)
|
||||
redis = require('redis')
|
||||
redisConf = Settings.redis.web
|
||||
rclient = redis.createClient(redisConf.port, redisConf.host)
|
||||
rclient.auth(redisConf.password)
|
||||
keys = require('./RedisKeyBuilder')
|
||||
logger = require "logger-sharelatex"
|
||||
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
Settings = require('settings-sharelatex')
|
||||
redis = require("redis-sharelatex")
|
||||
rclient = redis.createClient(Settings.redis.web)
|
||||
redis = require('redis')
|
||||
redisConf = Settings.redis.web
|
||||
rclient = redis.createClient(redisConf.port, redisConf.host)
|
||||
rclient.auth(redisConf.password)
|
||||
async = require('async')
|
||||
_ = require('underscore')
|
||||
keys = require('./RedisKeyBuilder')
|
||||
|
|
|
@ -7,8 +7,10 @@ Keys = require "./RedisKeyBuilder"
|
|||
{EventEmitter} = require "events"
|
||||
util = require "util"
|
||||
|
||||
redis = require("redis-sharelatex")
|
||||
rclient = redis.createClient(Settings.redis.web)
|
||||
redis = require('redis')
|
||||
redisConf = Settings.redis.web
|
||||
rclient = redis.createClient(redisConf.port, redisConf.host)
|
||||
rclient.auth(redisConf.password)
|
||||
|
||||
ShareJsModel:: = {}
|
||||
util.inherits ShareJsModel, EventEmitter
|
||||
|
|
|
@ -21,8 +21,7 @@
|
|||
"logger-sharelatex": "git+https://github.com/sharelatex/logger-sharelatex.git#v1.0.0",
|
||||
"metrics-sharelatex": "git+https://github.com/sharelatex/metrics-sharelatex.git#v1.0.0",
|
||||
"sinon": "~1.5.2",
|
||||
"mongojs": "0.9.11",
|
||||
"redis-sharelatex": "0.0.3"
|
||||
"mongojs": "0.9.11"
|
||||
},
|
||||
"devDependencies": {
|
||||
"grunt-execute": "~0.1.5",
|
||||
|
|
|
@ -22,7 +22,7 @@ describe 'putting a doc into memory', ()->
|
|||
|
||||
mocks =
|
||||
"logger-sharelatex": log:->
|
||||
"redis-sharelatex":
|
||||
redis:
|
||||
createClient : ()->
|
||||
auth:->
|
||||
multi: ()->
|
||||
|
|
|
@ -13,7 +13,7 @@ describe 'Document Manager - getUpdatesLength ', ->
|
|||
|
||||
@llenStub = sinon.stub()
|
||||
@redisManager = SandboxedModule.require modulePath, requires:
|
||||
"redis-sharelatex":
|
||||
redis:
|
||||
createClient:=>
|
||||
auth:->
|
||||
llen:@llenStub
|
||||
|
|
|
@ -12,7 +12,7 @@ describe "DispatchManager", ->
|
|||
"settings-sharelatex": @settings =
|
||||
redis:
|
||||
web: {}
|
||||
"redis-sharelatex": @redis = {}
|
||||
"redis": @redis = {}
|
||||
@callback = sinon.stub()
|
||||
|
||||
describe "each worker", ->
|
||||
|
|
|
@ -11,7 +11,7 @@ describe 'RedisManager - getDoc', ->
|
|||
@rclient.multi = () => @rclient
|
||||
|
||||
@RedisManager = SandboxedModule.require modulePath, requires:
|
||||
"redis-sharelatex": @redis =
|
||||
"redis": @redis =
|
||||
createClient: () => @rclient
|
||||
|
||||
@doc_id = "doc-id-123"
|
||||
|
|
|
@ -18,7 +18,7 @@ describe 'getting entire list of pending updates', ()->
|
|||
redisReturn = []
|
||||
|
||||
mocks =
|
||||
"redis-sharelatex":
|
||||
redis:
|
||||
createClient: ()->
|
||||
auth:->
|
||||
multi: ()->
|
||||
|
|
|
@ -19,7 +19,7 @@ describe 'getting cound of docs from memory', ()->
|
|||
beforeEach (done)->
|
||||
mocks =
|
||||
"logger-sharelatex": log:->
|
||||
"redis-sharelatex":
|
||||
redis:
|
||||
createClient : ()->
|
||||
auth:->
|
||||
smembers:(key, callback)->
|
||||
|
|
|
@ -19,7 +19,7 @@ describe 'Lock Manager - checking the lock', ()->
|
|||
mocks =
|
||||
"logger-sharelatex": log:->
|
||||
|
||||
"redis-sharelatex":
|
||||
redis:
|
||||
createClient : ()->
|
||||
auth:->
|
||||
multi: ->
|
||||
|
|
|
@ -14,7 +14,7 @@ describe 'LockManager - releasing the lock', ()->
|
|||
mocks =
|
||||
"logger-sharelatex": log:->
|
||||
|
||||
"redis-sharelatex":
|
||||
redis:
|
||||
createClient : ()->
|
||||
auth:->
|
||||
del:deleteStub
|
||||
|
|
|
@ -8,7 +8,7 @@ describe 'LockManager - getting the lock', ->
|
|||
beforeEach ->
|
||||
@LockManager = SandboxedModule.require modulePath, requires:
|
||||
"logger-sharelatex": log:->
|
||||
"redis-sharelatex":
|
||||
redis:
|
||||
createClient : () =>
|
||||
auth:->
|
||||
@callback = sinon.stub()
|
||||
|
|
|
@ -8,7 +8,7 @@ describe 'LockManager - trying the lock', ->
|
|||
beforeEach ->
|
||||
@LockManager = SandboxedModule.require modulePath, requires:
|
||||
"logger-sharelatex": log:->
|
||||
"redis-sharelatex":
|
||||
redis:
|
||||
createClient : () =>
|
||||
auth:->
|
||||
set: @set = sinon.stub()
|
||||
|
|
|
@ -10,7 +10,7 @@ describe "RedisManager.clearDocFromPendingUpdatesSet", ->
|
|||
@doc_id = "document-id"
|
||||
@callback = sinon.stub()
|
||||
@RedisManager = SandboxedModule.require modulePath, requires:
|
||||
"redis-sharelatex" : createClient: () =>
|
||||
"redis" : createClient: () =>
|
||||
@rclient = auth:->
|
||||
"logger-sharelatex": {}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ describe "RedisManager.getDocsWithPendingUpdates", ->
|
|||
beforeEach ->
|
||||
@callback = sinon.stub()
|
||||
@RedisManager = SandboxedModule.require modulePath, requires:
|
||||
"redis-sharelatex" : createClient: () =>
|
||||
"redis" : createClient: () =>
|
||||
@rclient = auth:->
|
||||
"logger-sharelatex": {}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ SandboxedModule = require('sandboxed-module')
|
|||
describe "RedisManager.getPendingUpdatesForDoc", ->
|
||||
beforeEach ->
|
||||
@RedisManager = SandboxedModule.require modulePath, requires:
|
||||
"redis-sharelatex": createClient: () =>
|
||||
"redis": createClient: () =>
|
||||
@rclient =
|
||||
auth: () ->
|
||||
multi: () => @rclient
|
||||
|
|
|
@ -8,7 +8,7 @@ describe "RedisManager.getPreviousDocOpsTests", ->
|
|||
beforeEach ->
|
||||
@callback = sinon.stub()
|
||||
@RedisManager = SandboxedModule.require modulePath, requires:
|
||||
"redis-sharelatex" : createClient: () =>
|
||||
"redis" : createClient: () =>
|
||||
@rclient =
|
||||
auth: ->
|
||||
multi: => @rclient
|
||||
|
|
|
@ -7,7 +7,7 @@ SandboxedModule = require('sandboxed-module')
|
|||
describe "RedisManager.pushDocOp", ->
|
||||
beforeEach ->
|
||||
@RedisManager = SandboxedModule.require modulePath, requires:
|
||||
"redis-sharelatex": createClient: () =>
|
||||
"redis": createClient: () =>
|
||||
@rclient =
|
||||
auth: () ->
|
||||
multi: () => @rclient
|
||||
|
|
|
@ -7,7 +7,7 @@ SandboxedModule = require('sandboxed-module')
|
|||
describe "RedisManager.pushUncompressedHistoryOp", ->
|
||||
beforeEach ->
|
||||
@RedisManager = SandboxedModule.require modulePath, requires:
|
||||
"redis-sharelatex": createClient: () =>
|
||||
"redis": createClient: () =>
|
||||
@rclient =
|
||||
auth: () ->
|
||||
multi: () => @rclient
|
||||
|
|
|
@ -24,7 +24,7 @@ describe 'removing single doc from memory', ()->
|
|||
"logger-sharelatex":
|
||||
error:->
|
||||
log:->
|
||||
"redis-sharelatex":
|
||||
redis:
|
||||
createClient : ->
|
||||
auth:->
|
||||
multi: ->
|
||||
|
|
|
@ -15,7 +15,7 @@ describe "ShareJsUpdateManager", ->
|
|||
class Model
|
||||
constructor: (@db) ->
|
||||
"./ShareJsDB" : @ShareJsDB = { mockDB: true }
|
||||
"redis-sharelatex" : createClient: () => @rclient = auth:->
|
||||
"redis" : createClient: () => @rclient = auth:->
|
||||
"logger-sharelatex": @logger = { log: sinon.stub() }
|
||||
globals:
|
||||
clearTimeout: @clearTimeout = sinon.stub()
|
||||
|
|
Loading…
Reference in a new issue