mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
return failed and succesfully flushed projects when flushing everything
This commit is contained in:
parent
6eba954b52
commit
d9a737f97c
1 changed files with 9 additions and 2 deletions
|
@ -56,8 +56,15 @@ ProjectFlusher =
|
|||
jobs = _.map project_ids, (project_id)->
|
||||
return (cb)->
|
||||
ProjectManager.flushAndDeleteProjectWithLocks project_id, cb
|
||||
async.parallelLimit jobs, options.concurrency, (error)->
|
||||
return callback(error, project_ids)
|
||||
async.parallelLimit async.reflectAll(jobs), options.concurrency, (error, results)->
|
||||
success = []
|
||||
failure = []
|
||||
_.each results, (result, i)->
|
||||
if result.error?
|
||||
failure.push(project_ids[i])
|
||||
else
|
||||
success.push(project_ids[i])
|
||||
return callback(error, {success:success, failure:failure})
|
||||
|
||||
|
||||
module.exports = ProjectFlusher
|
Loading…
Reference in a new issue