mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-09 00:22:38 +00:00
Merge pull request #51 from overleaf/ho-bump-redis
Bump redis with improved logging
This commit is contained in:
commit
2992c63c4f
4 changed files with 43 additions and 14 deletions
41
services/real-time/npm-shrinkwrap.json
generated
41
services/real-time/npm-shrinkwrap.json
generated
|
@ -1394,24 +1394,47 @@
|
|||
}
|
||||
},
|
||||
"redis-sharelatex": {
|
||||
"version": "1.0.6",
|
||||
"from": "git+https://github.com/sharelatex/redis-sharelatex.git#v1.0.6",
|
||||
"resolved": "git+https://github.com/sharelatex/redis-sharelatex.git#0992345e17d204066654260ad718170bbd1018d6",
|
||||
"version": "1.0.8",
|
||||
"resolved": "https://registry.npmjs.org/redis-sharelatex/-/redis-sharelatex-1.0.8.tgz",
|
||||
"integrity": "sha512-X88/tG03NKWoy0uMzTrzARvILaFj9ZoKGhECtjf8N7GeCzo90zCeT0cVIJCVHeECogXCxBRf/ABFUBBQKUOCew==",
|
||||
"requires": {
|
||||
"async": "^2.5.0",
|
||||
"coffee-script": "1.8.0",
|
||||
"ioredis": "~4.9.1",
|
||||
"redis-sentinel": "0.1.1",
|
||||
"underscore": "1.7.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"async": {
|
||||
"version": "2.6.2",
|
||||
"from": "async@>=2.5.0 <3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz"
|
||||
"resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz",
|
||||
"integrity": "sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==",
|
||||
"requires": {
|
||||
"lodash": "^4.17.11"
|
||||
}
|
||||
},
|
||||
"coffee-script": {
|
||||
"version": "1.8.0",
|
||||
"from": "coffee-script@1.8.0",
|
||||
"resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.8.0.tgz"
|
||||
"resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.8.0.tgz",
|
||||
"integrity": "sha1-nJ8dK0pSoADe0Vtll5FwNkgmPB0=",
|
||||
"requires": {
|
||||
"mkdirp": "~0.3.5"
|
||||
}
|
||||
},
|
||||
"lodash": {
|
||||
"version": "4.17.11",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz",
|
||||
"integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg=="
|
||||
},
|
||||
"mkdirp": {
|
||||
"version": "0.3.5",
|
||||
"from": "mkdirp@>=0.3.5 <0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.5.tgz"
|
||||
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.5.tgz",
|
||||
"integrity": "sha1-3j5fiWHIjHh+4TaN+EmsRBPsqNc="
|
||||
},
|
||||
"underscore": {
|
||||
"version": "1.7.0",
|
||||
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz",
|
||||
"integrity": "sha1-a7rwh3UA02vjTsqlhODbn+8DUgk="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
"express-session": "^1.9.1",
|
||||
"logger-sharelatex": "^1.6.0",
|
||||
"metrics-sharelatex": "^2.1.1",
|
||||
"redis-sharelatex": "git+https://github.com/sharelatex/redis-sharelatex.git#v1.0.6",
|
||||
"redis-sharelatex": "^1.0.8",
|
||||
"request": "^2.88.0",
|
||||
"session.socket.io": "^0.1.6",
|
||||
"settings-sharelatex": "^1.1.0",
|
||||
|
|
|
@ -48,6 +48,7 @@ describe "applyOtUpdate", ->
|
|||
rclient.lrange "pending-updates-list", 0, -1, (error, [doc_id]) =>
|
||||
doc_id.should.equal "#{@project_id}:#{@doc_id}"
|
||||
done()
|
||||
return null
|
||||
|
||||
it "should push the update into redis", (done) ->
|
||||
rclient.lrange redisSettings.documentupdater.key_schema.pendingUpdates({@doc_id}), 0, -1, (error, [update]) =>
|
||||
|
@ -58,7 +59,8 @@ describe "applyOtUpdate", ->
|
|||
user_id: @user_id
|
||||
}
|
||||
done()
|
||||
|
||||
return null
|
||||
|
||||
after (done) ->
|
||||
async.series [
|
||||
(cb) => rclient.del "pending-updates-list", cb
|
||||
|
@ -107,6 +109,7 @@ describe "applyOtUpdate", ->
|
|||
rclient.llen redisSettings.documentupdater.key_schema.pendingUpdates({@doc_id}), (error, len) =>
|
||||
len.should.equal 0
|
||||
done()
|
||||
return null
|
||||
|
||||
describe "when authorized to read-only with a comment update", ->
|
||||
before (done) ->
|
||||
|
@ -142,6 +145,7 @@ describe "applyOtUpdate", ->
|
|||
rclient.lrange "pending-updates-list", 0, -1, (error, [doc_id]) =>
|
||||
doc_id.should.equal "#{@project_id}:#{@doc_id}"
|
||||
done()
|
||||
return null
|
||||
|
||||
it "should push the update into redis", (done) ->
|
||||
rclient.lrange redisSettings.documentupdater.key_schema.pendingUpdates({@doc_id}), 0, -1, (error, [update]) =>
|
||||
|
@ -152,7 +156,8 @@ describe "applyOtUpdate", ->
|
|||
user_id: @user_id
|
||||
}
|
||||
done()
|
||||
|
||||
return null
|
||||
|
||||
after (done) ->
|
||||
async.series [
|
||||
(cb) => rclient.del "pending-updates-list", cb
|
||||
|
|
|
@ -12,8 +12,9 @@ describe "Session", ->
|
|||
}, (error) =>
|
||||
throw error if error?
|
||||
@client = RealTimeClient.connect()
|
||||
done()
|
||||
|
||||
return done()
|
||||
return null
|
||||
|
||||
it "should not get disconnected", (done) ->
|
||||
disconnected = false
|
||||
@client.on "disconnect", () ->
|
||||
|
|
Loading…
Add table
Reference in a new issue