codius / old-codius-cli

Codius Client Command Line Interface (CLI)
https://codius.org
Apache License 2.0
110 stars 13 forks source link

Feature request: upload in parallel #39

Closed sharafian closed 6 years ago

sharafian commented 6 years ago

https://github.com/codius/codius/blob/master/src/handlers/upload.js#L83

Right now, codius uploads to one host after another using this for loop. If we did Promise.all it would go many times faster when uploading to several hosts

theogravity commented 6 years ago

The native Promise.all() won't work for this situation - it rejects on the first rejection.

You'll want to look into one of these solutions to make it work:

https://stackoverflow.com/questions/31424561/wait-until-all-es6-promises-complete-even-rejected-promises

traviscrist commented 6 years ago

Implemented in the Codius CLI 3.0.0.