mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-08 07:52:06 +00:00
simplify comments
This commit is contained in:
parent
ea0dd9700b
commit
0f87ae1f74
3 changed files with 6 additions and 14 deletions
|
@ -89,11 +89,8 @@ module.exports = DocumentManager =
|
|||
callback null
|
||||
else
|
||||
DocumentManager.flushAndDeleteDoc project_id, doc_id, (error) ->
|
||||
# Flush in the background since it requires a http request. We
|
||||
# want to flush project history if the previous call only failed
|
||||
# to delete the doc from Redis. There is no harm in flushing
|
||||
# project history if the previous call failed to flush at all. So
|
||||
# do this before checking errors.
|
||||
# There is no harm in flushing project history if the previous
|
||||
# call failed and sometimes it is required
|
||||
HistoryManager.flushProjectChangesAsync project_id
|
||||
|
||||
return callback(error) if error?
|
||||
|
|
|
@ -107,11 +107,8 @@ module.exports = HttpController =
|
|||
timer = new Metrics.Timer("http.deleteDoc")
|
||||
DocumentManager.flushAndDeleteDocWithLock project_id, doc_id, (error) ->
|
||||
timer.done()
|
||||
# Flush in the background since it requires a http request. We
|
||||
# want to flush project history if the previous call only failed
|
||||
# to delete the doc from Redis. There is no harm in flushing
|
||||
# project history if the previous call failed to flush at all. So
|
||||
# do this before checking errors.
|
||||
# There is no harm in flushing project history if the previous call
|
||||
# failed and sometimes it is required
|
||||
HistoryManager.flushProjectChangesAsync project_id
|
||||
|
||||
return next(error) if error?
|
||||
|
|
|
@ -59,10 +59,8 @@ module.exports = ProjectManager =
|
|||
|
||||
logger.log project_id: project_id, doc_ids: doc_ids, "deleting docs"
|
||||
async.series jobs, () ->
|
||||
# Flush in the background since it requires a htpt request. If we
|
||||
# flushed and deleted only some docs successfully then we should still
|
||||
# flush project history. If no docs succeeded then there is still no
|
||||
# harm flushing project history. So do this before checking errors.
|
||||
# There is no harm in flushing project history if the previous call
|
||||
# failed and sometimes it is required
|
||||
HistoryManager.flushProjectChangesAsync project_id
|
||||
|
||||
if errors.length > 0
|
||||
|
|
Loading…
Add table
Reference in a new issue