Skip to content

Commit

Permalink
Merge pull request #50 from DrPaulBrewer/upgrade-async
Browse files Browse the repository at this point in the history
Upgrade tiny-async-pool, google cloud storage nodejs driver, and other dependencies
  • Loading branch information
DrPaulBrewer committed Jul 27, 2023
2 parents 8c2e344 + a8af582 commit 5a65b2f
Show file tree
Hide file tree
Showing 7 changed files with 849 additions and 908 deletions.
5 changes: 5 additions & 0 deletions .idea/.gitignore

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

8 changes: 8 additions & 0 deletions .idea/modules.xml

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

6 changes: 6 additions & 0 deletions .idea/vcs.xml

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

12 changes: 12 additions & 0 deletions .idea/zip-bucket.iml

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

9 changes: 6 additions & 3 deletions index.js
Expand Up @@ -109,10 +109,13 @@ module.exports = (storage) => (options) => {
});
}

function zipEachFile(filelist) {
async function zipEachFile(filelist) {
const {concurrentLimit = 1} = options;
// asyncPool used this way will not work in 2.x or later
return asyncPool(concurrentLimit, filelist, zipFile);
const results = [];
for await (const result of asyncPool(concurrentLimit, filelist, zipFile)) {
results.push(result);
}
return results;
}

function finalize() {
Expand Down

0 comments on commit 5a65b2f

Please sign in to comment.