mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
remove unused code and fix flushing
This commit is contained in:
parent
1179518f4e
commit
739445336f
1 changed files with 7 additions and 12 deletions
|
@ -133,6 +133,11 @@ module.exports = ClsiManager =
|
||||||
logger.log project_id: project_id, projectStateHash: projectStateHash, docs: docUpdaterDocs?, "checked project state"
|
logger.log project_id: project_id, projectStateHash: projectStateHash, docs: docUpdaterDocs?, "checked project state"
|
||||||
# see if we can send an incremental update to the CLSI
|
# see if we can send an incremental update to the CLSI
|
||||||
if docUpdaterDocs? and options.syncType isnt "full"
|
if docUpdaterDocs? and options.syncType isnt "full"
|
||||||
|
# Workaround: for now, always flush project to mongo on compile
|
||||||
|
# until we have automatic periodic flushing on the docupdater
|
||||||
|
# side, to prevent documents staying in redis too long.
|
||||||
|
DocumentUpdaterHandler.flushProjectToMongo project_id, (error) ->
|
||||||
|
return callback(error) if error?
|
||||||
Metrics.inc "compile-from-redis"
|
Metrics.inc "compile-from-redis"
|
||||||
ClsiManager._buildRequestFromDocupdater project_id, options, project, projectStateHash, docUpdaterDocs, callback
|
ClsiManager._buildRequestFromDocupdater project_id, options, project, projectStateHash, docUpdaterDocs, callback
|
||||||
else
|
else
|
||||||
|
@ -173,16 +178,6 @@ module.exports = ClsiManager =
|
||||||
options.syncState = projectStateHash
|
options.syncState = projectStateHash
|
||||||
ClsiManager._finaliseRequest project_id, options, project, docs, files, callback
|
ClsiManager._finaliseRequest project_id, options, project, docs, files, callback
|
||||||
|
|
||||||
_getContentFromDocUpdater: (project_id, callback = (error, docs) ->) ->
|
|
||||||
# Workaround: for now, always flush project to mongo on compile
|
|
||||||
# until we have automatic periodic flushing on the docupdater
|
|
||||||
# side, to prevent documents staying in redis too long.
|
|
||||||
DocumentUpdaterHandler.flushProjectToMongo project_id, (error) ->
|
|
||||||
return callback(error) if error?
|
|
||||||
DocumentUpdaterHandler.getProjectDocs project_id, (error, docs) ->
|
|
||||||
return callback(error) if error?
|
|
||||||
callback(null, docs)
|
|
||||||
|
|
||||||
_getContentFromMongo: (project_id, callback = (error, docs, files) ->) ->
|
_getContentFromMongo: (project_id, callback = (error, docs, files) ->) ->
|
||||||
DocumentUpdaterHandler.flushProjectToMongo project_id, (error) ->
|
DocumentUpdaterHandler.flushProjectToMongo project_id, (error) ->
|
||||||
return callback(error) if error?
|
return callback(error) if error?
|
||||||
|
|
Loading…
Reference in a new issue