From d82b180b7624e97ea27dc59e9a8700e3501674f7 Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Thu, 3 Oct 2019 04:01:56 +0100 Subject: [PATCH] avoid project history queues building up with deferred flush --- .../document-updater/app/coffee/DeleteQueueManager.coffee | 2 +- .../test/acceptance/coffee/DeletingAProjectTests.coffee | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/services/document-updater/app/coffee/DeleteQueueManager.coffee b/services/document-updater/app/coffee/DeleteQueueManager.coffee index 985222df69..9e3f1c176e 100644 --- a/services/document-updater/app/coffee/DeleteQueueManager.coffee +++ b/services/document-updater/app/coffee/DeleteQueueManager.coffee @@ -38,7 +38,7 @@ module.exports = DeleteQueueManager = logger.debug {project_id, timestamps, flushTimestamp}, "found newer timestamp, will skip delete" return cb() logger.log {project_id, flushTimestamp}, "flushing queued project" - ProjectManager.flushAndDeleteProjectWithLocks project_id, {skip_history_flush: true}, (err) -> + ProjectManager.flushAndDeleteProjectWithLocks project_id, {skip_history_flush: false}, (err) -> if err? logger.err {project_id, err}, "error flushing queued project" metrics.inc "queued-delete-completed" diff --git a/services/document-updater/test/acceptance/coffee/DeletingAProjectTests.coffee b/services/document-updater/test/acceptance/coffee/DeletingAProjectTests.coffee index 6c1f7fe8ed..cddc008bc0 100644 --- a/services/document-updater/test/acceptance/coffee/DeletingAProjectTests.coffee +++ b/services/document-updater/test/acceptance/coffee/DeletingAProjectTests.coffee @@ -169,6 +169,6 @@ describe "Deleting a project", -> for doc in @docs MockTrackChangesApi.flushDoc.calledWith(doc.id).should.equal true - it "should not flush to project history", -> - MockProjectHistoryApi.flushProject.called.should.equal false + it "should flush to project history", -> + MockProjectHistoryApi.flushProject.called.should.equal true