mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
write to doc collection first
This commit is contained in:
parent
5928c91b2b
commit
7b0b72494f
1 changed files with 2 additions and 3 deletions
|
@ -48,11 +48,10 @@ module.exports = DocManager =
|
|||
rev: doc.rev
|
||||
}, "updating doc lines"
|
||||
async.series [
|
||||
(cb)->
|
||||
# project collection is still primary so that needs to be successful first
|
||||
MongoManager.updateDoc project_id, mongoPath, lines, cb
|
||||
(cb)->
|
||||
MongoManager.upsertIntoDocCollection project_id, doc_id, lines, doc.rev, cb
|
||||
(cb)->
|
||||
MongoManager.updateDoc project_id, mongoPath, lines, cb
|
||||
], (error)->
|
||||
return callback(error) if error?
|
||||
callback null, true, doc.rev + 1 # rev will have been incremented in mongo by MongoManager.updateDoc
|
||||
|
|
Loading…
Reference in a new issue