avoid project history queues building up with deferred flush

This commit is contained in:
Brian Gough 2019-10-03 04:01:56 +01:00
parent c1454bc4ac
commit d82b180b76
2 changed files with 3 additions and 3 deletions

View file

@ -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"

View file

@ -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