From e8f09f33577894e01141fa25909e71e190e2ccff Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Tue, 1 Dec 2015 16:03:05 +0000 Subject: [PATCH] added comment about flushing to track changes --- services/document-updater/app/coffee/DocumentManager.coffee | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/services/document-updater/app/coffee/DocumentManager.coffee b/services/document-updater/app/coffee/DocumentManager.coffee index 0faa8d2b8a..258784a48c 100644 --- a/services/document-updater/app/coffee/DocumentManager.coffee +++ b/services/document-updater/app/coffee/DocumentManager.coffee @@ -100,6 +100,11 @@ module.exports = DocumentManager = DocumentManager.flushDocIfLoaded project_id, doc_id, (error) -> return callback(error) if error? + # We should flush pending ops to track-changes here but this is + # already done in the real-time WebsocketController.leaveProject + # method so we leave it there. Note, if you ever add the flush + # in here be sure to do it in the background because it can take + # a long time. RedisManager.removeDocFromMemory project_id, doc_id, (error) -> return callback(error) if error? callback null