|
|
@@ -4,9 +4,10 @@ const minimist = require('minimist')
|
|
|
async function main() {
|
|
|
const argv = minimist(process.argv.slice(2), {
|
|
|
default: {
|
|
|
- limit: 100000,
|
|
|
+ limit: 100_000,
|
|
|
concurrency: 5,
|
|
|
'dry-run': false,
|
|
|
+ 'log-progress': 1_000,
|
|
|
},
|
|
|
boolean: ['dry-run', 'help'],
|
|
|
alias: { h: 'help', n: 'dry-run', j: 'concurrency' },
|
|
|
@@ -19,7 +20,8 @@ Usage: node scripts/flush_all.js [options]
|
|
|
Options:
|
|
|
--limit Number of projects to flush (default: 100000)
|
|
|
--concurrency, -j Number of concurrent flush operations (default: 5)
|
|
|
- --dryRun, -n Perform a dry run without making any changes (default: false)
|
|
|
+ --dry-run, -n Perform a dry run without making any changes (default: false)
|
|
|
+ --log-progress Log progress after flushing every Nth project (default: 1000)
|
|
|
--help, -h Show this help message
|
|
|
`)
|
|
|
process.exit(0)
|
|
|
@@ -29,6 +31,7 @@ Options:
|
|
|
limit: argv.limit,
|
|
|
concurrency: argv.concurrency,
|
|
|
dryRun: argv['dry-run'],
|
|
|
+ logProgress: argv['log-progress'],
|
|
|
}
|
|
|
console.log('Flushing all projects with options:', options)
|
|
|
|