mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-29 07:33:36 -05:00
make event order check a configuration setting
This commit is contained in:
parent
a724021900
commit
8a7804f0a7
3 changed files with 4 additions and 2 deletions
|
@ -34,7 +34,7 @@ module.exports = DocumentUpdaterController =
|
||||||
logger.error {err: error, channel}, "error parsing JSON"
|
logger.error {err: error, channel}, "error parsing JSON"
|
||||||
return
|
return
|
||||||
if message.op?
|
if message.op?
|
||||||
if message._id?
|
if message._id? && settings.checkEventOrder
|
||||||
status = EventLogger.checkEventOrder("applied-ops", message._id, message)
|
status = EventLogger.checkEventOrder("applied-ops", message._id, message)
|
||||||
if status is 'duplicate'
|
if status is 'duplicate'
|
||||||
return # skip duplicate events
|
return # skip duplicate events
|
||||||
|
|
|
@ -41,7 +41,7 @@ module.exports = WebsocketLoadBalancer =
|
||||||
if message.room_id == "all"
|
if message.room_id == "all"
|
||||||
io.sockets.emit(message.message, message.payload...)
|
io.sockets.emit(message.message, message.payload...)
|
||||||
else if message.room_id?
|
else if message.room_id?
|
||||||
if message._id?
|
if message._id? && Settings.checkEventOrder
|
||||||
status = EventLogger.checkEventOrder("editor-events", message._id, message)
|
status = EventLogger.checkEventOrder("editor-events", message._id, message)
|
||||||
if status is "duplicate"
|
if status is "duplicate"
|
||||||
return # skip duplicate events
|
return # skip duplicate events
|
||||||
|
|
|
@ -52,6 +52,8 @@ settings =
|
||||||
|
|
||||||
continualPubsubTraffic: process.env['CONTINUAL_PUBSUB_TRAFFIC'] or false
|
continualPubsubTraffic: process.env['CONTINUAL_PUBSUB_TRAFFIC'] or false
|
||||||
|
|
||||||
|
checkEventOrder: process.env['CHECK_EVENT_ORDER'] or false
|
||||||
|
|
||||||
sentry:
|
sentry:
|
||||||
dsn: process.env.SENTRY_DSN
|
dsn: process.env.SENTRY_DSN
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue