Skip to content

Commit

Permalink
add debug to diagnose duplicate uploads
Browse files Browse the repository at this point in the history
  • Loading branch information
nhorvath-bowery committed Oct 7, 2021
1 parent 9b9e078 commit 5cac947
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ async function run() {
if (pattern) {
await core.group(`uploading batch ${pattern}`, async () => {
const files = await globby(pattern)
core.info(`file list ${files}`)
core.info(`File list: ${files}`)

await dropbox.uploadFiles(files, destination, {
onProgress: (current, total, file) => {
Expand Down
2 changes: 2 additions & 0 deletions src/upload/dropbox/DropboxUploader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ export class DropboxUploader implements Uploader {
) => {
this.logger?.info(`Start uploading ${files.length} files`)

let count = 0
for await (const file of files) {
onProgress?.(0, 100, file)
await this.retryWhenTooManyRequests(async () => {
Expand All @@ -162,6 +163,7 @@ export class DropboxUploader implements Uploader {
})
})
onProgress?.(100, 100, file)
this.logger?.info(`${++count}/${files.length} files uploaded`)
}
}

Expand Down

0 comments on commit 5cac947

Please sign in to comment.