Skip to content

Commit

Permalink
Remove console logs
Browse files Browse the repository at this point in the history
  • Loading branch information
itcon-pty-au authored Dec 13, 2024
1 parent 976cb6f commit 7a0da7f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions s3.js
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,7 @@ async function backupToS3() {

if (dataSize > chunkSize) {
try {
console.log('Starting Multipart upload to S3');
//console.log('Starting Multipart upload to S3');
const createMultipartParams = {
Bucket: bucketName,
Key: 'typingmind-backup.json',
Expand Down Expand Up @@ -929,7 +929,7 @@ async function backupToS3() {
ETag: uploadResult.ETag,
PartNumber: partNumber
});
console.log(`Part ${partNumber} uploaded successfully with ETag: ${uploadResult.ETag}`);
//console.log(`Part ${partNumber} uploaded successfully with ETag: ${uploadResult.ETag}`);
break; // Success, exit retry loop
} catch (error) {
console.error(`Error uploading part ${partNumber}:`, error);
Expand All @@ -955,7 +955,7 @@ async function backupToS3() {

// Update progress
const progress = Math.round((start + chunkSize) / dataSize * 100);
console.log(`Upload progress: ${Math.min(progress, 100)}%`);
//console.log(`Upload progress: ${Math.min(progress, 100)}%`);
}

const sortedParts = uploadedParts
Expand All @@ -974,10 +974,10 @@ async function backupToS3() {
}
};

console.log('Complete Multipart Upload Request:', JSON.stringify(completeParams, null, 2));
//console.log('Complete Multipart Upload Request:', JSON.stringify(completeParams, null, 2));

await s3.completeMultipartUpload(completeParams).promise();
console.log('Multipart upload completed successfully');
//console.log('Multipart upload completed successfully');
} catch (error) {
console.error('Multipart upload failed:', error);
// Fall back to regular upload if multipart fails
Expand Down

0 comments on commit 7a0da7f

Please sign in to comment.