mirror of
https://github.com/overleaf/overleaf.git
synced 2025-03-11 08:01:22 +00:00
avoid unnecessary call to insert packs into index
This commit is contained in:
parent
719e0291aa
commit
08fc151eee
1 changed files with 1 additions and 1 deletions
|
@ -261,7 +261,7 @@ module.exports = PackManager =
|
||||||
# find all packs prior to current pack
|
# find all packs prior to current pack
|
||||||
PackManager.findUnindexedPacks project_id, doc_id, (err, newPacks) ->
|
PackManager.findUnindexedPacks project_id, doc_id, (err, newPacks) ->
|
||||||
return callback(err) if err?
|
return callback(err) if err?
|
||||||
return callback() if not newPacks?
|
return callback() if not newPacks? or newPacks.length is 0
|
||||||
PackManager.insertPacksIntoIndexWithLock project_id, doc_id, newPacks, (err) ->
|
PackManager.insertPacksIntoIndexWithLock project_id, doc_id, newPacks, (err) ->
|
||||||
return callback(err) if err?
|
return callback(err) if err?
|
||||||
logger.log {project_id, doc_id, newPacks}, "added new packs to index"
|
logger.log {project_id, doc_id, newPacks}, "added new packs to index"
|
||||||
|
|
Loading…
Reference in a new issue