mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Merge pull request #77 from overleaf/bg-use-individual-channels
support per-doc pubsub channels
This commit is contained in:
commit
2c0c3dc573
2 changed files with 9 additions and 2 deletions
|
@ -36,4 +36,9 @@ module.exports = RealTimeRedisManager =
|
|||
# create a unique message id using a counter
|
||||
message_id = "doc:#{HOST}:#{RND}-#{COUNT++}"
|
||||
data?._id = message_id
|
||||
pubsubClient.publish "applied-ops", JSON.stringify(data)
|
||||
# publish on separate channels for individual projects and docs when
|
||||
# configured (needs realtime to be configured for this too).
|
||||
if Settings.publishOnIndividualChannels
|
||||
pubsubClient.publish "applied-ops:#{data.doc_id}", JSON.stringify(data)
|
||||
else
|
||||
pubsubClient.publish "applied-ops", JSON.stringify(data)
|
||||
|
|
|
@ -91,4 +91,6 @@ module.exports =
|
|||
url: "mongodb://#{process.env["MONGO_HOST"] or "localhost"}/sharelatex"
|
||||
|
||||
sentry:
|
||||
dsn: process.env.SENTRY_DSN
|
||||
dsn: process.env.SENTRY_DSN
|
||||
|
||||
publishOnIndividualChannels: process.env['PUBLISH_ON_INDIVIDUAL_CHANNELS'] or false
|
||||
|
|
Loading…
Reference in a new issue