Merge pull request #7869 from overleaf/em-docstore-archive-lock

Add a lock around doc archiving

GitOrigin-RevId: eaf85dbc3b491edd15eeb2c1a84df3a2883fb61d
This commit is contained in:
Eric Mc Sween
2022-05-18 08:04:44 +00:00
committed by Copybot
parent 30b07f3d34
commit de4091f955
11 changed files with 115 additions and 93 deletions
+1 -1
View File
@@ -238,7 +238,7 @@ function archiveAllDocs(req, res, next) {
function archiveDoc(req, res, next) {
const { doc_id: docId, project_id: projectId } = req.params
logger.debug({ projectId, docId }, 'archiving a doc')
DocArchive.archiveDocById(projectId, docId, function (error) {
DocArchive.archiveDoc(projectId, docId, function (error) {
if (error) {
return next(error)
}