Merge pull request #8546 from overleaf/bg-fix-docupdater-history-redis

[document-updater] docsWithHistoryOps should use the main rclient

GitOrigin-RevId: a86c081ea0b0f02a9d4c36df0ca76dc9aa3bac57
This commit is contained in:
Brian Gough 2022-06-23 09:08:33 +01:00 committed by Copybot
parent ef8e181dff
commit e7e4e49d90
2 changed files with 2 additions and 4 deletions

View file

@ -12,9 +12,7 @@
*/ */
let HistoryRedisManager let HistoryRedisManager
const Settings = require('@overleaf/settings') const Settings = require('@overleaf/settings')
const rclient = require('@overleaf/redis-wrapper').createClient( const { rclient } = require('./RedisManager') // docsWithHistoryOps lives in main redis
Settings.redis.history
)
const Keys = Settings.redis.history.key_schema const Keys = Settings.redis.history.key_schema
const logger = require('@overleaf/logger') const logger = require('@overleaf/logger')

View file

@ -25,7 +25,7 @@ describe('HistoryRedisManager', function () {
this.rclient.multi = () => this.rclient this.rclient.multi = () => this.rclient
this.HistoryRedisManager = SandboxedModule.require(modulePath, { this.HistoryRedisManager = SandboxedModule.require(modulePath, {
requires: { requires: {
'@overleaf/redis-wrapper': { createClient: () => this.rclient }, './RedisManager': { rclient: this.rclient },
'@overleaf/settings': { '@overleaf/settings': {
redis: { redis: {
history: (this.settings = { history: (this.settings = {