applied migration performance improvements

This commit is contained in:
Wyatt Johnson
2018-01-25 18:17:04 -07:00
parent 75751285fe
commit 6caae2df97
5 changed files with 123 additions and 86 deletions
+2 -3
View File
@@ -28,7 +28,6 @@ async function createMigration(name) {
async function runMigrations(options) {
const { yes, queryBatchSize, updateBatchSize } = options;
console.log({ yes, queryBatchSize, updateBatchSize });
try {
if (!yes) {
const { backedUp } = await inquirer.prompt([
@@ -109,13 +108,13 @@ program
'-q, --query-batch-size <n>',
'change the size of queried documents that are batched at a time',
parse10,
100
10000
)
.option(
'-u, --update-batch-size <n>',
'change the size of documents that are batched before the update is sent',
parse10,
1000
20000
)
.option('-y, --yes', 'will answer yes to all questions')
.description('runs all pending migrations')