mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -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"
|
||||
return
|
||||
if message.op?
|
||||
if message._id?
|
||||
if message._id? && settings.checkEventOrder
|
||||
status = EventLogger.checkEventOrder("applied-ops", message._id, message)
|
||||
if status is 'duplicate'
|
||||
return # skip duplicate events
|
||||
|
|
|
@ -41,7 +41,7 @@ module.exports = WebsocketLoadBalancer =
|
|||
if message.room_id == "all"
|
||||
io.sockets.emit(message.message, message.payload...)
|
||||
else if message.room_id?
|
||||
if message._id?
|
||||
if message._id? && Settings.checkEventOrder
|
||||
status = EventLogger.checkEventOrder("editor-events", message._id, message)
|
||||
if status is "duplicate"
|
||||
return # skip duplicate events
|
||||
|
|
|
@ -52,6 +52,8 @@ settings =
|
|||
|
||||
continualPubsubTraffic: process.env['CONTINUAL_PUBSUB_TRAFFIC'] or false
|
||||
|
||||
checkEventOrder: process.env['CHECK_EVENT_ORDER'] or false
|
||||
|
||||
sentry:
|
||||
dsn: process.env.SENTRY_DSN
|
||||
|
||||
|
|
Loading…
Reference in a new issue