mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-03 22:54:07 +00:00
don't publish on individual channels until explicitly set
This commit is contained in:
parent
804f4c2bd2
commit
f6f6f549d9
2 changed files with 4 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
|||
logger = require 'logger-sharelatex'
|
||||
metrics = require "metrics-sharelatex"
|
||||
settings = require "settings-sharelatex"
|
||||
|
||||
ClientMap = new Map() # for each redis client, stores a Set of subscribed channels
|
||||
|
||||
|
@ -34,7 +35,7 @@ module.exports = ChannelManager =
|
|||
metrics.inc "unsubscribe.#{baseChannel}"
|
||||
|
||||
publish: (rclient, baseChannel, id, data) ->
|
||||
if id is 'all'
|
||||
if id is 'all' or !settings.publishOnIndividualChannels
|
||||
channel = baseChannel
|
||||
else
|
||||
channel = "#{baseChannel}:#{id}"
|
||||
|
|
|
@ -54,6 +54,8 @@ settings =
|
|||
|
||||
checkEventOrder: process.env['CHECK_EVENT_ORDER'] or false
|
||||
|
||||
publishOnIndividualChannels: process.env['PUBLISH_ON_INDIVIDUAL_CHANNELS'] or false
|
||||
|
||||
sentry:
|
||||
dsn: process.env.SENTRY_DSN
|
||||
|
||||
|
|
Loading…
Reference in a new issue