mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-20 19:16:00 +00:00
Merge pull request #86 from overleaf/ho-add-logging
Add logging for all project flushing
This commit is contained in:
commit
c64cae2248
1 changed files with 3 additions and 0 deletions
|
@ -6,6 +6,7 @@ docUpdaterKeys = Settings.redis.documentupdater.key_schema
|
|||
async = require("async")
|
||||
ProjectManager = require("./ProjectManager")
|
||||
_ = require("lodash")
|
||||
logger = require("logger-sharelatex")
|
||||
|
||||
ProjectFlusher =
|
||||
|
||||
|
@ -46,6 +47,7 @@ ProjectFlusher =
|
|||
return ids
|
||||
|
||||
flushAllProjects: (options, callback)->
|
||||
logger.log options:options, "flushing all projects"
|
||||
ProjectFlusher._getKeys docUpdaterKeys.docsInProject({project_id:"*"}), options.limit, (error, project_keys) ->
|
||||
if error?
|
||||
logger.err err:error, "error getting keys for flushing"
|
||||
|
@ -64,6 +66,7 @@ ProjectFlusher =
|
|||
failure.push(project_ids[i])
|
||||
else
|
||||
success.push(project_ids[i])
|
||||
logger.log success:success, failure:failure, "finished flushing all projects"
|
||||
return callback(error, {success:success, failure:failure})
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue