mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Merge pull request #64 from overleaf/bg-make-event-order-check-configurable
make event order check a configuration setting
This commit is contained in:
commit
b8c152ad12
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