mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-30 20:31:34 +02:00
don't publish on individual channels until explicitly set
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user