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