more debugging for migration

This commit is contained in:
Cassie Tarakajian 2017-12-26 21:50:45 -05:00
parent ad269d60c6
commit 0ba9f33f09

View file

@ -1,4 +1,5 @@
/* eslint-disable */ /* eslint-disable */
console.log('in move bucket');
import s3 from 's3'; import s3 from 's3';
import path from 'path'; import path from 'path';
import mongoose from 'mongoose'; import mongoose from 'mongoose';
@ -11,18 +12,18 @@ mongoose.connection.on('error', () => {
process.exit(1); process.exit(1);
}); });
let client = s3.createClient({ // let client = s3.createClient({
maxAsyncS3: 20, // maxAsyncS3: 20,
s3RetryCount: 3, // s3RetryCount: 3,
s3RetryDelay: 1000, // s3RetryDelay: 1000,
multipartUploadThreshold: 20971520, // this is the default (20 MB) // multipartUploadThreshold: 20971520, // this is the default (20 MB)
multipartUploadSize: 15728640, // this is the default (15 MB) // multipartUploadSize: 15728640, // this is the default (15 MB)
s3Options: { // s3Options: {
accessKeyId: `${process.env.AWS_ACCESS_KEY}`, // accessKeyId: `${process.env.AWS_ACCESS_KEY}`,
secretAccessKey: `${process.env.AWS_SECRET_KEY}`, // secretAccessKey: `${process.env.AWS_SECRET_KEY}`,
region: `${process.env.AWS_REGION}` // region: `${process.env.AWS_REGION}`
}, // },
}); // });
Project.find({}, (err, projects) => { Project.find({}, (err, projects) => {
projects.forEach((project, projectIndex) => { projects.forEach((project, projectIndex) => {