mirror of
https://github.com/overleaf/overleaf.git
synced 2025-03-03 11:43:26 +00:00
make flush to track-changes failsafe
This commit is contained in:
parent
dcd7649bad
commit
65cf4cf7c7
1 changed files with 3 additions and 2 deletions
|
@ -13,8 +13,9 @@ module.exports = HistoryManager =
|
||||||
return
|
return
|
||||||
RedisManager.getHistoryType doc_id, (err, projectHistoryType) ->
|
RedisManager.getHistoryType doc_id, (err, projectHistoryType) ->
|
||||||
if err?
|
if err?
|
||||||
logger.error {err, doc_id}, "error getting history type"
|
logger.warn {err, doc_id}, "error getting history type"
|
||||||
else if projectHistoryType is "project-history"
|
# if there's an error continue and flush to track-changes for safety
|
||||||
|
if projectHistoryType is "project-history"
|
||||||
logger.debug {doc_id, projectHistoryType}, "skipping track-changes flush"
|
logger.debug {doc_id, projectHistoryType}, "skipping track-changes flush"
|
||||||
else
|
else
|
||||||
url = "#{Settings.apis.trackchanges.url}/project/#{project_id}/doc/#{doc_id}/flush"
|
url = "#{Settings.apis.trackchanges.url}/project/#{project_id}/doc/#{doc_id}/flush"
|
||||||
|
|
Loading…
Reference in a new issue