mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
avoid project history queues building up with deferred flush
This commit is contained in:
parent
c1454bc4ac
commit
d82b180b76
2 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue