mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-04 06:39:02 +02:00
avoid project history queues building up with deferred flush
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user