mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
support per-doc pubsub channels
This commit is contained in:
parent
0c8922c769
commit
c9ccf62d71
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 and data.doc_id?
|
||||
pubsubClient.publish "applied-ops:#{data.doc_id}", JSON.stringify(data)
|
||||
else
|
||||
pubsubClient.publish "applied-ops", JSON.stringify(data)
|
||||
|
|
|
@ -92,3 +92,5 @@ module.exports =
|
|||
|
||||
sentry:
|
||||
dsn: process.env.SENTRY_DSN
|
||||
|
||||
publishOnIndividualChannels: process.env['PUBLISH_ON_INDIVIDUAL_CHANNELS'] or false
|
||||
|
|
Loading…
Reference in a new issue