Skip to content

Commit

Permalink
Attempt to execute the upload command to R2 up to seven times
Browse files Browse the repository at this point in the history
  • Loading branch information
danielrozenberg committed Aug 15, 2023
1 parent cdea21f commit 6828c1c
Show file tree
Hide file tree
Showing 3 changed files with 2,264 additions and 3,240 deletions.
5 changes: 3 additions & 2 deletions build-system/release-workflows/upload-release.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const fastGlob = require('fast-glob');
const fs = require('fs-extra');
const klaw = require('klaw');
const path = require('path');
const {bgWhite, cyan} = require('kleur/colors');
const {cyan} = require('kleur/colors');
const {log} = require('../common/logging');
const {runReleaseJob} = require('./release-job');
const {S3} = require('@aws-sdk/client-s3');
Expand Down Expand Up @@ -86,7 +86,7 @@ function logProgress_(totalFiles, processedFiles) {
if (printProgressReady || processedFiles === totalFiles) {
log(
'[' +
bgWhite(' '.repeat(percentage)) +
'#'.repeat(percentage) +
'.'.repeat(PROGRESS_WIDTH - percentage) +
']',
cyan(processedFiles),
Expand Down Expand Up @@ -192,6 +192,7 @@ async function uploadFiles_() {
accessKeyId,
secretAccessKey,
},
maxAttempts: 7,
});

let totalFiles = 0;
Expand Down
Loading

0 comments on commit 6828c1c

Please sign in to comment.