|
@@ -107,11 +107,8 @@ module.exports = HttpController =
|
|
|
timer = new Metrics.Timer("http.deleteDoc")
|
|
timer = new Metrics.Timer("http.deleteDoc")
|
|
|
DocumentManager.flushAndDeleteDocWithLock project_id, doc_id, (error) ->
|
|
DocumentManager.flushAndDeleteDocWithLock project_id, doc_id, (error) ->
|
|
|
timer.done()
|
|
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
|
|
HistoryManager.flushProjectChangesAsync project_id
|
|
|
|
|
|
|
|
return next(error) if error?
|
|
return next(error) if error?
|