mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-24 18:43:28 +00:00
Merge branch 'dcl-i1507e'
GitOrigin-RevId: 6368f274c2b19d12c571cf065291805a4ff50a4e
This commit is contained in:
parent
3553fb2d9d
commit
eadc6b838b
1 changed files with 4 additions and 2 deletions
|
@ -17,6 +17,7 @@ const minimist = require('minimist')
|
||||||
const argv = minimist(process.argv.slice(2))
|
const argv = minimist(process.argv.slice(2))
|
||||||
const bvId = argv._[0]
|
const bvId = argv._[0]
|
||||||
const commit = argv.commit !== undefined
|
const commit = argv.commit !== undefined
|
||||||
|
const maxParallel = 4
|
||||||
|
|
||||||
console.log(
|
console.log(
|
||||||
(commit ? 'Remove' : 'Dry run for remove') +
|
(commit ? 'Remove' : 'Dry run for remove') +
|
||||||
|
@ -35,8 +36,9 @@ db.projects.find(
|
||||||
|
|
||||||
function processRemovals(err, projects) {
|
function processRemovals(err, projects) {
|
||||||
if (err) throw err
|
if (err) throw err
|
||||||
async.mapSeries(
|
async.eachLimit(
|
||||||
projects,
|
projects,
|
||||||
|
maxParallel,
|
||||||
function(project, cb) {
|
function(project, cb) {
|
||||||
count += 1
|
count += 1
|
||||||
console.log(
|
console.log(
|
||||||
|
@ -54,7 +56,7 @@ function processRemovals(err, projects) {
|
||||||
cb
|
cb
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
cb()
|
async.setImmediate(cb)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
function(err) {
|
function(err) {
|
||||||
|
|
Loading…
Reference in a new issue